×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Finding Records

Finding Records

Finding Records

(OP)
Hello Everyone,

I have two forms within Access.  I have a combo boxes on both forms which lists SSN's.  What I want to be able to do is when I select an SSN from the first form once I have saved that record I have a command button which opens the second form when I open the second form I have some code that looks for that SSN and pulls up the data for that SSN in the second form. But when I use the combo box on the second form to select another SSN and I use a command button to go back to the first form the SSN's don't match.  It is only when I pull up the second form and try in go back to the first form I run into a problem with unmatched SSN's.  

Here is the code that I use to find the SSN's when I go from the first form to the second form

I have tried to use the same concept for the first form but since the first form is already open/loaded I can't use this method.

Private Sub Form_Open(Cancel As Integer)
Dim getCAN As String

getCAN = Form_PILOT3.CAN
Me.RecordsetClone.FindFirst "[CAN] = '" & getCAN & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
Me.cboSearching.SETFOCUS

End Sub

If anyone know of an easier way to do this or improvements that I can make with my code to solve the problem I would appreciate it.

Neaka

  

RE: Finding Records

If you want your code to run when you switch forms you could put it in the form's ACTIVATE event.

I'm not sure that this will solve your problem, but maybe it will be a step in the right direction. Hope it helps.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close