I want to stick with the unbound form/child object method of adding records, since it's pretty much a guarantee that data doesn't get added until the user clicks "add record(s)". That being said, what is the best way to add multiple records from one form? I could have the form add the record and then clear out the input boxes one at a time, but I feel a datasheet would be best, so the user doesn't inadvertently add the same record twice (I know, I can disallow duplicates, but I'm trying to mitigate the problem this way first). So, any suggestions to using an unbound datasheet to add records?
I really miss the old lounge...I could have just searched and found an answer, I'm sure.
Creating multiple records from one form (datasheet view)
-
- Lounger
- Posts: 47
- Joined: 26 Jan 2010, 01:05
-
- Administrator
- Posts: 78596
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Creating multiple records from one form (datasheet view)
A datasheet can't be unbound, it must have a record source.
Best wishes,
Hans
Hans
-
- Lounger
- Posts: 47
- Joined: 26 Jan 2010, 01:05
Re: Creating multiple records from one form (datasheet view)
So any tips for adding multiple records? I want to manage our company's image builds and the updates that are applied. I want to do so using three tables, one for builds, one for updates, and one that links the two. The updates are usually pushed in groups, so it would behoove us to add them as such. Again, it's not a requirement, and I know an acceptable solution, but I feel there is/should be a *better* one.
-
- 4StarLounger
- Posts: 482
- Joined: 24 Jan 2010, 15:02
- Location: Colorado, USA
Re: Creating multiple records from one form (datasheet view)
By adding multiple records I presume you are referring to adding records in the Updates table and the Links table at the point someone clicks to save a set of data that has been entered. We typically do that in VBA using DAO most of the time, but occasionally using ADO. By definition, a continous or datasheet form needs to have bound to a dataset in order to display multiple records. You can set that dynamically based on user input, so that might be a way of displaying already entered data. However, when we've implemented those sort of solutions, we find the user regularly ignores them anyhow.
Over time we've adopted the form/subform approach and find it really works pretty well. You do get the occasional user who enters spurious records without realizing it, but we've not found a good way of dealing with those kind of users other than to "beat" on them so to speak until they understand the process. The real beauty of the form/subform is that you don't have to expend the effort to write all that code, and have the exposure to bugs and crashes and such that you have to do to use unbound forms. I've created only one unbound form in the last three years for a very specialized data entry process where we needed to add records to nearly a dozen tables when the user clicked Save - and it took about 30 hours of coding, testing and debugging. Not the way I like to spend my time.
Over time we've adopted the form/subform approach and find it really works pretty well. You do get the occasional user who enters spurious records without realizing it, but we've not found a good way of dealing with those kind of users other than to "beat" on them so to speak until they understand the process. The real beauty of the form/subform is that you don't have to expend the effort to write all that code, and have the exposure to bugs and crashes and such that you have to do to use unbound forms. I've created only one unbound form in the last three years for a very specialized data entry process where we needed to add records to nearly a dozen tables when the user clicked Save - and it took about 30 hours of coding, testing and debugging. Not the way I like to spend my time.
Wendell
You can't see the view if you don't climb the mountain!
You can't see the view if you don't climb the mountain!
-
- Administrator
- Posts: 78596
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Creating multiple records from one form (datasheet view)
I agree with Wendell's suggestion.
If you want to stay with an unbound form, you could use multiple sets of controls, either below each other (with a vertical scroll bar if necessary) or in tab pages.
Or if you want to create a series of records with a set of common fields and, say, a sequence number, you could use DAO to create them in one go.
If you want to stay with an unbound form, you could use multiple sets of controls, either below each other (with a vertical scroll bar if necessary) or in tab pages.
Or if you want to create a series of records with a set of common fields and, say, a sequence number, you could use DAO to create them in one go.
Best wishes,
Hans
Hans