open one form with linked field

D

davethewelder

Hi, i have one form which searches for a patient record and when found has a
button to open another form. This works ok but I cannot get the Patient
number to link to the patient number in the new form. The new form
"referrals" has to update the Referrals Table.

Do I need some thing in the BeforeUpdate event?

Any help appreciated.

Davie
 
D

Damon Heron

if the referral form has a patient number bound to the referral table, then
open the referral form with an openarg statement, like this:

DoCmd.openform "frmReferral", , , , , , [yourPatientNumberName]

In the load event of the referral form:

If Len(Nz(Me.OpenArgs, "")) > 0 And Me.NewRecord Then
Me.[yourPatientNumberfield] = Me.OpenArgs
else
' do something else....
End If


Damon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top