open one form with linked field

  • Thread starter Thread starter davethewelder
  • Start date Start date
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
 
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
 
Back
Top