Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening form resticted to a specific record field value 1

Status
Not open for further replies.

Mikeyis4dcats

Technical User
Jan 16, 2003
59
US
As I explained in another thread, I want to use a command button to open a form to enter a new record or edit existing records for a specific customer. How can this be done?

Remou mentioned in the other thread that one could use a DoCmd.OpenForm argument, but I am a very basic Access user and am not familiar with using VBE.

 
You can use the wizard to create a button, it will walk you through opening a form to a specific record.
 
I see the Find Record option under the wizard, but that promtpts the user to enter information.

I need the button to return record where the CustomerID is a given number. Say, for customer #5, to only return records where the Pet's owner is Cutomer #5. If there are no existing records for #5, I need to open a new record.

Can that be done without using VBE?
 
Can that be done without using VBE
Provided the RelationShips are properly set, simply follow the wizard to create the customer mainform and the pets linked subform.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
The subform displays the proper information, my trouble is getting the pop-up form to restrict the records to records for only that client.

here's a screenshot of my Customer Info form


Here's a screenshot of the Pet Info form (that I only want to have show what's in the subform

 
If you wish to open a second form, choose Open Form from Form Operations, not find record.
 
Have a look at the 4th argument of the DoCmd.OpenForm method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Remou

(Man it would be alot easier if you could edit posts and quote replies on here!)

My current setup has the comman button using Open Form to open the form. The problem is that it displays all the records and I need to omit other owner's pets. Hence my post.

I know how to get it to open the form, just not how to filter the records in the table the second form is based on to only those records related to the current Owner on the other form.
 
I need to omit other owner's pets
Did you make some sense with my reply stamped Aug 07 16:36 ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top