Data Entry Form/Subform?

J

Jason Gyetko

I need to create a form where I can input values to Field1, Field2, Field3,
Field4, & Field5. The problem I have is that I need to enter multiple
records for Field4 & Field5 while still using the same data from Field1,
Field2, & Field3. A record needs to be written to the source table for each
record entered in Field4 & Field5 and still update each of those records
with the value from Field1, Field2, & Field3. I tried to accomplish this by
creating a form (source Table1) with Field1, Field2, and Field3 on it, then
creating a subform (source Table1) with Field4 & Field5 on it. But this way
writes four individual records, the first being Field1, Field2, Field3 (like
entered on the form) and leaving Field4 & Field5 blank. The next three
records are Field4 & Field5 (like entered on the form) and leaving Field1,
Field2, and Field3 blank. What is the best way to accomplish this so that
the data entered on Form1 populates Table1 as shown below? Do I even need
to use a subform?

Form1
----------------------------
Field1: Field2: Field3:
XXXX XXXX XXXX

Field4: Field5:
XXXX XXXX
YYYY YYYY
ZZZZ ZZZZ

Table1 (should look like this after the above is entered):
 
S

Shao

Use subforms if when you want to show data from tables or
queries with a one-to-many relationship. What are you
trying to do? I am assuming that when you update
something in Field 1 and/or Field 2, the same data plus
other data shows up in the subform? Or did you want the
data in Field 1 & Field 2 to show up in the subform but
also allow for data entry in the subform too? Please
clarify.
 
J

Jason Gyetko

I'm using the subform for data entry. I don't want Field1, Field2 & Field3
to show up on the subform (just the main form), but I want them to be
inserted into the same record as the subform is writing to. I have this
working right now by making Field1, Field2, Field3 (main form) unbound and
then I created three hidden text boxes on my subform (bound to the source
table) and set them equal to the Field1, Field2, & Field3 from the main
form. This works fine although it didn't sound like the correct way to go
about it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top