AutoFill with a SubForm

dc_sc

Registered User.
Local time
Today, 05:04
Joined
May 30, 2003
Messages
24
Can someone please help me with NO CODE please?

I have a CustomerID table that is linked one-to-many with a DailyEntry table by CusID.

I would like a form that allows the user to type in the CusID and the names will autofill from the CusID table. I also want the subform to display all the DailyEntry records for that customer. If the CusID does not exist, I want the form to create a new record from the CusID and the names that would have to be entered by the user.

I can do a data entry form with a subform, and I can do the autofill using a query for the CusID and soucing the name boxes to the query columns, but I can't seem to get them to work together.

Thanks and, once again, no code please. I am a novice.
 
No Code

It is hard to give you advice without showing some code.
Perhaps you can upload the mdb to make a little easier for someone to help.


Code:
If the CusID does not exist, I want the form to create a new record from the CusID and the names that would have to be entered by the user.

You want to make sure that there will be some type of confirmation before a new record is being created. Suppose the user makes a typo while entering the ID for an existing client. You don't want to have a new record created in that case.
 
I somehow got the subform to work, but now I cannot enter a new record because the name boxes are bound to the query. Here is a sample db that represents the one I am working on.
 

Attachments

Well, for me i would create a command button to popup a form in the main form.

First, create the popup form base the the customerID table. Create textboxes bound to fields of the table. In the properties tab - Data, set the Data Entry to 'Yes'. Save the form.

Next, open the main form in design mode, create a command button, follow the wizard instruction to open a form (ie your popup form).

HTH
 

Users who are viewing this thread

Back
Top Bottom