Conditional Equation

C

C. Sharp

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
 
G

Graham Mandeno

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.
 

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