Hello,
I'm somewhat new to this, and I definately need some help. I have a db for a small business, and I have a main form, Customer Info, which has a subform Appliance Info, which has a subform Service Call Info... these three forms are linked, and I run into a problem when I try to search through records. I set up a different form where the user can select a customer, after which he can either push a button and using that customer's information add a new appliance, or a second combo box appears that has a list of the appliances already on record for this customer. This is repeated for service calls after an appliance is selected. Now, my problem is not searching, I have that working, and I can find all the records no problem. I can open the main form, Customer Info with its Primary Key, but I have no clue how to open a subform with its primary key. I've tried many things and none have worked so I was hoping to find someone more brilliant than me here.
The code for one of the buttons looks like this:
Private Sub NewAppliance_Click()
DoCmd.OpenForm "Customer Info", , , "[Unique]=Forms![Search]!
[SelCustomer]", acEdit ---> this is supposed to open the main form
This middle part is my problem. I have the primary key for the Appliance Info form which is saved in an unbound field, and I just don't know how to reach the subform to pass this to it. :( I've looked and looked and I have a feeling I might be able to do this with the FindFirst method, but I don't really know how to set it up.
DoCmd.Close acForm, "Search" ---> this is just closing the search form after
End Sub
I would greatly appreciate your help, I'm in desperate need of it.
Cheers