Carry ID from one form to another

  • Thread starter Thread starter Malcolm Andersson
  • Start date Start date
M

Malcolm Andersson

Hi all. First time posting on a newsgroup so I may be posting something that
has allready been answerd to.

I have this database I've been devolping for a client and I've hit a problem
I cannot seem to solve.
In the first form the user search for the right dog (animal hospital). And
when the user has found the right one and pushes the button to go to the
Journal form I want the journal-form to get the ID number for the correct
dog so when they starts to type in the entries in the journal it gets under
the correct place.
The name for the first form is: Frm-Patientkort and for the second it is
Frm-Journal and the combo-searhc you search after the dog is called:
Hundens_namn_komob

Thanks in advance
Malcolm
 
Malcolm,
Is your Journal Form already filtered or based off a query so that you get
only that dog's info when you click on the button?

Either way, on the Frm-Journal and the field for the dog ID put an
expression pointing to the first form dog ID field in the default value:
=Forms![Frm-Patientkort]![DogID]

Hope this helps.
 
Thank you very much!
I used that phrase as filter for the form and now it works splendid!
Malcolm

Jackie L said:
Malcolm,
Is your Journal Form already filtered or based off a query so that you get
only that dog's info when you click on the button?

Either way, on the Frm-Journal and the field for the dog ID put an
expression pointing to the first form dog ID field in the default value:
=Forms![Frm-Patientkort]![DogID]

Hope this helps.

Malcolm Andersson said:
Hi all. First time posting on a newsgroup so I may be posting something that
has allready been answerd to.

I have this database I've been devolping for a client and I've hit a problem
I cannot seem to solve.
In the first form the user search for the right dog (animal hospital). And
when the user has found the right one and pushes the button to go to the
Journal form I want the journal-form to get the ID number for the correct
dog so when they starts to type in the entries in the journal it gets under
the correct place.
The name for the first form is: Frm-Patientkort and for the second it is
Frm-Journal and the combo-searhc you search after the dog is called:
Hundens_namn_komob

Thanks in advance
Malcolm
 
Back
Top