Populate fields on editable form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form which we use to Complete information by use of check boxes, option groups and date fields with many fields such as Account Name, Address, City , State, EAP, Policy Number pre-filled by the record source query when a prompt is completed.

I have a command button to create an additional exact same form for filling out if additonal locations visited need to be completed in addition to the one brought up by the prompt answer. Of course when I create the additional form the fields pre-filled on the original form are not pre-filed on the secondary form.

How can I make the fields that need to be carried forward to the addtional input screen pre-filled into the appropriate fields or stay in the fields when the command button is clicked that creates the second input form?
 
Brian

I'm not completely clear from your description, but it sounds like you have
a table structure that requires you to "create an additional exact ..." copy
because you describe "the additional form ... fields pre-filled".

If so, this would be very much what you'd do with a spreadsheet, but not at
all appropriate for a relational database. Could you describe your
underlying data structure that requires two identical forms and copies of
data?
 
Brian

I'm sure you feel you've described what I asked for. However, you reply
mentioned forms and subforms, but nothing about tables. Access stored data
in tables, and displays data in forms and reports. Without some idea of the
underlying table (data) structure, it will be difficult to understand what
you are trying to do with your forms.
 
Jeff,

Tables are Account Information, Location and Service Calls. Policy number is Primary Key for Account Information and Child for Location. Location ID is Primary Key for Location and Child for Service Calls.

I also have a Service Completion Table which uses Policy Number has child field to link to Account Information. There is also a one-to-one by Service Call Number between Service Call Completion Table and Service Calls Table.

The SQL query uses fields from all tables except Service Call Completion which has fields such as Date Call Completed, Date Report Sent and other fields to be filled out as a result of a call be completed.

Fields I would like populated would be Assigned Consultant, Service Division, Account Number, Policy Number, EAP for example which all would come from Account Information and Location Table information.

Hope this helps.
 
Brian

I think I better understand now (always dangerous!).

It sounds like you are trying to duplicate text values from a "parent" table
to a "child" table. You don't need to do this with a relational database.
From your description, you are already using the parent's primary key as a
foreign key in the child table.

If you want to see parent table fields related to a child table row, one way
is to create a query that joins the two tables on the shared key field.

If you want to have a parent record on display, but see it's child
record(s), the main form/subform approach works well. As your original post
mentioned, this will allow you to add child records without having to
duplicate information.
 
Brian

I may be missing something, but the impression I'm left with is that I've
told you that what you are trying to do is not a good idea, and you've
responded, "yes, I know, but how do I do it?"

I'll bow out at this point and suggest that you re-post your question --
perhaps another reader can offer a solution more to your liking.
 
Back
Top