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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

command button that can open a form from a subform

Status
Not open for further replies.

vmauro

Technical User
Nov 17, 2003
29
US
I have a
mainform called PatientTable,
Subform called PatientVisitsSubform

they are linked together by patientID.

I have a third form called Transactions

this form has a relationship to the PatientVisitsSubform using the a field called transactionID

Now I have the the default view in the subform (PatientVisitsSubform) set to Continuous Forms. I would like to put a command button that when clicked will open up the Transactions form where transactionID = TransactionID.

I have it done using a macro and isloaded functions, but I run into problems if I created a new record in the subform and try to create a new record in the Transactions.

I need to back out of the subform then re-enter the subform and click the button, this works. I would like to do it from VBA and I cant get it to work, I tried searching for examples but I just wasnt able to get it



 
Save the current record before opening the form.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I get erros when I try to save before the macro runs and after the macro runs

I am not sure what i am doing wrong

how would I save the record when I cleck the command button
 
What is the VBA code of the Click event procedure of the button ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top