Waitlist creation

Bear

Registered User.
Local time
Today, 22:23
Joined
Jan 20, 2000
Messages
11
Being a rookie at Access, I imagine the answer is simple. I am developing a waiting list using a SIN number as a primary key. What I'm hoping to accomplish is when I enter in the SIN number the form fills with their previous information unless they are a new client. Any ideas would be helpful.
 
Try this:

On the AfterUpdate of the SIN Number

Private Sub SIN_AfterUpdate()
on error resume next
Dim rst as RecordSource
set rst = Currentdb.OpenRecordSet("Select * from [tblData] where SIN = " & me.SIN,dbOpenSnapShot)
rst.movefirst
if Err.Number = 0 Then 'This is only for SINs with data
Me.[Field1] = rstFields("Field1")
Me.[Field2] = rstFields("Field2")
Me.[Field3] = rstFields("Field3")
Me.[Field4] = rstFields("Field4")
set rst = Nothing
end if


Just add new lines if you need them.
 
Thanks Travis for the help your help has pointed me in the right direction and has given me a few new ideas.
 

Users who are viewing this thread

Back
Top Bottom