Auto filling fields in forms

  • Thread starter Thread starter clueless123
  • Start date Start date
C

clueless123

Guest
I am an access newbie (as you'll see by my question)...
I've created a form that contains several fields including a case# and a date. I have three other forms that I want to link to the main form and have the case# and date fields automatically filled out (and update the related table) when I open the secondary forms from the main form. I'm obviously missing a connection somewhere, but not quite sure what I need to do.

Thanks for your help!
 
If you are leaving the main form open and pop up the other forms you could set the default values for the fields you want automatically completed to be =mainform!case#. Use the builder to get the right syntax.
 
Open the form in design view (the main form with case #, etc). Assuming you have already built the other forms, use the command button to "Open Form" and set the criteria using the wizard to open using specific data. (Make sure the wizard icon is toggled). Follow the instructions and link the forms (or tables in this case). Once you have created this link the command buttons will open the forms you set and will populate the fields. If you have any problem let me know directly. I have built several databases that refer to case numbers, complaint numers, dates, etc. Maybe something I have already created might assist you. Email direct at tcoolidg@twcny.rr.com and I'll see what I can do for ya. Good luck.

Marty
 
Similar problem

This is my first post here. Very well done discussion board.

My problem is similar to this one, but not exactly.

I have a main form (Person) and a linked form (Phone). When I click a button on the Person form it opens Phone that is filtered where foreign key on Phone form = primary key on Person. The data retrieved is actually different kinds of phone numbers associated with an individual (e.g. Home, Cell, Pager). The data is displayed in tabular format.

When adding a record, I want the foreign key value to be automatically filled by the vaule of the primary key on the main form or the value of the foreign key of the displayed filtered rows.

I've tried this: =[Form]![ [POC_Main_Table]![ID] and this =[Form]![frm_con_num]![fk_ID_POC_Main_Table]. Nothing seems to work.

I do have the relationships defined between Parent/Child. I'm not using a subform for Phone. I'd like to make it a popup but haven't found it in the Properties box. I know I've been able to select that option before.

I'm sorry if this doesn't make complete sense as I'm fairly new to Access but an old hand at relational databases.

Thanks for the help

Jim
 
jdbegg

You need to put your form reference in the correct event procedure. Try it on the popuform's BeforeInsert or OnCurrent
 

Users who are viewing this thread

Back
Top Bottom