Conditional Equation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm new to Vbasic programming and need help with the following

I have a multi tabbed form and on the first page of this form I have 2 fields: ID and Last Name.

I need to make the following happen: if ID = "PI" then take the data found in the Last Name field and copy it to the second page of my multi tabbed form and put the Last Name data into a field labeled PI Name.

I would want this to be performed after the ID field has been updated
How can I make this happen.
Thanks for assistance
C. Shar
 
Attach some code to the AfterUpdate event of the ID field:

Private Sub ID_AfterUpdate()
If ID = "PI" Then
Me.[Other field] = Me.[Last Name]
End If
End Sub

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

C. Sharp said:
I'm new to Vbasic programming and need help with the following:

I have a multi tabbed form and on the first page of this form I have 2 fields: ID and Last Name.

I need to make the following happen: if ID = "PI" then take the data
found in the Last Name field and copy it to the second page of my multi
tabbed form and put the Last Name data into a field labeled PI Name.
 
Back
Top