Unbound Data Entry/Edit Forms (1 Viewer)

JustinS

Member
Local time
Yesterday, 20:50
Joined
Apr 11, 2020
Messages
58
The project that I am working on could potentially need to move to using unbound data entry/edit forms instead of bound forms. I am not excited about the prospect, but I need to research it nonetheless.

Here is what I will need out of my data entry form. A single form will be used to populate two separate tables. The information is linked but would need to be housed in separate tables. The information on the top portion of the form would be used to generate one new record in its table, but I would need to create multiple records within the table related to the information on the bottom portion of the form. Here's why I believe it would need to be an unbound form. We don't want the users deciding which inputs they need to enter for each commodity. So the idea of using a customer orders type form where the user picks products or inputs based upon request isn't a viable option.

Do any of you guys have any "nifty" sample data entry forms that I could get ideas from? I have a good idea of how the code works to pass the data to the tables, but just wanted to see if you guys had thoughts, advice, or examples that you could lend. Thank you guys so much for all the help you have given me thus far.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:50
Joined
Aug 30, 2003
Messages
36,127
Most of what I create uses bound forms, but occassionally I use unbound forms. Based on your other thread, I think I'd have tests in a related table, not fields. I'd have a table that related appliances and tests (which tests are used for each appliance). You could use a bound form that pulled the appropriate tests for the selected appliance.
 

JustinS

Member
Local time
Yesterday, 20:50
Joined
Apr 11, 2020
Messages
58
Forgive my ignorance on this one I am trying to learn. I can have a bound form that will create say eight, for example, new records at a single time in one table while only creating a single record on the other? How would this work? I have not seen anything like that before.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:50
Joined
Oct 29, 2018
Messages
21,494
Forgive my ignorance on this one I am trying to learn. I can have a bound form that will create say eight, for example, new records at a single time in one table while only creating a single record on the other? How would this work? I have not seen anything like that before.
Hi. If you have a one-to-many relationship between two tables, you would typically use a form/subform setup to enter data in both tables. Is that what you're asking?
 

JustinS

Member
Local time
Yesterday, 20:50
Joined
Apr 11, 2020
Messages
58
I understand how this scenario would work with the user choosing to add a new record on the sub form. Like adding items to an order. The thing I’m having difficulty understanding is how the six or eight records would be created automatically based upon entries in the parent form, if that makes sense. We don’t want the user defining the type or number of inputs. We want that to be done programmatically.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:50
Joined
Oct 29, 2018
Messages
21,494
I understand how this scenario would work with the user choosing to add a new record on the sub form. Like adding items to an order. The thing I’m having difficulty understanding is how the six or eight records would be created automatically based upon entries in the parent form, if that makes sense. We don’t want the user defining the type or number of inputs. We want that to be done programmatically.
Programmatically, then nothing is stopping you from doing it. For example, if you defined in a table what records need to be created, then you should be able to use an APPEND query to create those records, using code.
However, I would have to say just because something can be done programmatically, it doesn't mean it's a good idea to do so.
 

JustinS

Member
Local time
Yesterday, 20:50
Joined
Apr 11, 2020
Messages
58
@theDBguy can a form be bound to an append query?

Your last statement about being able to do something grammatically but it not being a good idea, is that in reference to not allowing users to define inputs or that I should regularly use an append query to insert records?
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:50
Joined
Aug 30, 2003
Messages
36,127
I use the append query dbGuy mentions in an app for vehicle activity. During data entry, I prepopulate an activity table with the various rates applicable to the type of vehicle the driver was in. If they were in a limousine, I populate with the 8-10 rates the driver may have used during their shift. If they were in a bus, different rates get populated. The users can't enter/select the wrong rates. In my case, the driver may have only used 2-3 of the available rates, I delete any that weren't used.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:50
Joined
Oct 29, 2018
Messages
21,494
Can a form be bound an append query?
No, that would not be "programmatically," which you asked about. Instead, you execute the APPEND query using code to populate the table for your bound form. However, I'll try to repeat, unless you have a very good reason like what @pbaldy had, I would recommend against creating "placeholder" records.
 

JustinS

Member
Local time
Yesterday, 20:50
Joined
Apr 11, 2020
Messages
58
I definitely have minimal experience compared to you guys which is why I was trying to keep things very simple. That's why I was really iffy on the notion on unbound forms and using placeholder records and temporary tables.
 
Last edited:

Users who are viewing this thread

Top Bottom