Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Unbound fields to table

Started 1 month, 2 weeks ago by klompZA
Hi guys! I'm brand spanking new to Access...so please, throw this dog a bone! My problem: I have a form with unbound fields. Reason for this is so that I can validate the data before writing it to the table. So when the "save" button is clicked, all fields are verified, and only when all is right the data is saved to the table. I have searched for code, and I have tried it, but ...
Site: dBforums - Database Support Community  dBforums - Database Support Community - site profile
Forum: Microsoft Access  Microsoft Access - forum profile
Total authors: 10 authors
Total thread posts: 21 post
Thread activity: no new posts during last week
Domain info for: dbforums.com

Other posts in this thread:

nckdryr replied 1 month, 2 weeks ago
Welcome to the forums. I've used an approach similar to this in past projects. What I did was to generate an Append Query in VBA based on the user-input, and then ran that. If you need help writing SQL in VBA, I'd have a look at Martin Green's site . HTH

myle replied 1 month, 2 weeks ago
My Rule is the Table hold the validate less coding needed also when you add a new form showing differance info the validate rule are always there.

StarTrekker replied 1 month, 2 weeks ago
On small apps, I use the bound approach and just do the validation in the BeforeUpdate and Cancel it if there is an issue. Other than that I use VBA recordsets (DAO) to write to the appropriate table on SAVE. Code: Sub SaveRecord() <Validation Commands> Dim RS as Recordset Set RS = CurrentDB.OpenRecordSet("<SQL to your Table and Record>") RS.Edit (or RS.AddNew if it's a...

pkstormy replied 1 month, 2 weeks ago
Similar to ST, I use functions to read/write retrieve data to/from the unbound forms. But I don't put the functions in the form (and thus, can't use me.controlname) and I reference the form itself to read/write to the data fields. Utilizing the IsloadedForm function (you can find this module in the code bank) I then use the same function to determine which form to read/write to. For ...

pkstormy replied 1 month, 2 weeks ago
Quote: Originally Posted by myle My Rule is the Table hold the validate less coding needed also when you add a new form showing differance info the validate rule are always there. I really don't like doing this and wouldn't recommend it. Especially since validation rules can change and this can be a nightmare to ...

pkstormy replied 1 month, 2 weeks ago
Note also that there are a couple of posts by izyrider in the code bank which deal with unbound forms.

klompZA replied 1 month, 2 weeks ago
jeez guys, the response is great! thank you!!

chigley3 replied 1 month, 2 weeks ago
Hello, Please answer the question asked. I originally created tables in which a form was feeding off. However I needed the form to use some arithmetic so I changed the Control Source in order to run the Expression. Now the data from the form will not update in the table because it is not linked anymore... HOW DO I HAVE USE THE EXPRESSION IN THE FORM AND THEN HAVE THE DATA ...

nckdryr replied 1 month, 2 weeks ago
Quote: Originally Posted by chigley3 Please answer the question asked. Since you're new to the forums, I'd suggest having a look at our FAQ . The question has been answered, with many options offered and often with more than adequate information provided. Besides that, I think there are more than a few ...

pkstormy replied 1 month, 2 weeks ago
Quote: Originally Posted by chigley3 Hello, Please answer the question asked. I originally created tables in which a form was feeding off. However I needed the form to use some arithmetic so I changed the Control Source in order to run the Expression. Now the data from the form will not update in the table because it is ...

 

Top contributing authors

Name
Posts
pkstormy
6
user's latest post:
Unbound fields to table - Page 2...
Published (2009-11-12 23:43:00)
chigley3, I apologize for my confusion in the previous posts. It is the ControlSource, NOT the SourceObject that you want to put the expression. I re-read one of my previous posts and I'm sorry about getting these mixed up.
chigley3
3
user's latest post:
Unbound fields to table
Published (2009-11-12 06:08:00)
If it is easier to use the expression in the query I dont mind. I am trying to put the expression in the criteria box for example =[labour rate]+[labour time] = labour cost the expression is not working in the query? how could something so simple be so complicated?
klompZA
2
user's latest post:
Unbound fields to table
Published (2009-11-10 09:01:00)
jeez guys, the response is great! thank you!!
nckdryr
2
user's latest post:
Unbound fields to table
Published (2009-11-11 09:16:00)
Quote: Originally Posted by chigley3 Please answer the question asked. Since you're new to the forums, I'd suggest having a look at our FAQ . The question has been answered, with many options offered and often with more than adequate information provided. Besides that, I think there are more than a few people around these forums who have qualms with storing calculated fields (it's generally a frowned upon practice).
chigley3 Registered User
2
user's latest post:
Unbound fields to table
Published (2009-11-12 06:08:00)
If it is easier to use the expression in the query I dont mind. I am trying to put the expression in the criteria box for example =[labour rate]+[labour time] = labour cost the expression is not working in the query? how could something so simple be so complicated?
pkstormy Moderator
2
user's latest post:
Unbound fields to table - Page 2...
Published (2009-11-12 23:43:00)
chigley3, I apologize for my confusion in the previous posts. It is the ControlSource, NOT the SourceObject that you want to put the expression. I re-read one of my previous posts and I'm sorry about getting these mixed up.
myle
1
user's latest post:
Unbound fields to table
Published (2009-11-09 17:02:00)
My Rule is the Table hold the validate less coding needed also when you add a new form showing differance info the validate rule are always there.
StarTrekker
1
user's latest post:
Unbound fields to table
Published (2009-11-09 19:31:00)
On small apps, I use the bound approach and just do the validation in the BeforeUpdate and Cancel it if there is an issue. Other than that I use VBA recordsets (DAO) to write to the appropriate table on SAVE. Code: Sub SaveRecord() &lt;Validation Commands&gt; Dim RS as Recordset Set RS = CurrentDB.OpenRecordSet(&quot;&lt;SQL to your Table and Record&gt;&quot;) RS.Edit (or RS.AddNew if it's a new record being...
Missinglinq
1
user's latest post:
Unbound fields to table
Published (2009-11-12 17:52:00)
Quote: Originally Posted by klompZA I have a form with unbound fields. Reason for this is so that I can validate the data before writing it to the table. There are few valid reasons for using unbound forms in Access, and the reason you give is certainly not one of them ! I wish a pox on whoever keeps perpetuating this absurd notion! Using unbound forms for data entry means that you are forfeiting at least half of the advantage in using a...
Missinglinq Registered User
1
user's latest post:
Unbound fields to table
Published (2009-11-12 17:52:00)
Quote: Originally Posted by klompZA I have a form with unbound fields. Reason for this is so that I can validate the data before writing it to the table. There are few valid reasons for using unbound forms in Access, and the reason you give is certainly not one of them ! I wish a pox on whoever keeps perpetuating this absurd notion! Using unbound forms for data entry means that you are forfeiting at least half of the advantage in using a...

Related threads on "dBforums - Database Support Community":

Related threads on other sites:

Thread profile page for "Unbound fields to table" on http://www.dbforums.com. This report page is a snippet summary view from a single thread "Unbound fields to table", located on the Message Board at http://www.dbforums.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity