• ** There has been a recent site upgrade. Please clear your browser cache to avoid issues. **
  • New forum feature - post voting and best solution

    Check out this thread for the details: https://www.access-programmers.co.uk/forums/threads/new-forum-feature-post-voting-and-best-answer.314134/

    This new feature looks great to me! :)

  • We now have 3 forum themes

    Go for the default (light) theme, Shades of Grey or Shades of Blue. I just added the Blue one.

    The thread about it is here: https://www.access-programmers.co.uk/forums/threads/new-forum-theme-shades-of-blue.314136/

Waitlist creation (1 Viewer)

Bear

Registered User.
Local time
Today, 10:13
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.
 

Travis

Registered User.
Local time
Today, 02:13
Joined
Dec 17, 1999
Messages
1,332
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.
 

Bear

Registered User.
Local time
Today, 10:13
Joined
Jan 20, 2000
Messages
11
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

Top Bottom