jcwillette
Registered User.
- Local time
- Today, 00:41
- Joined
- Jan 19, 2009
- Messages
- 23
I have a database that has 2 forms, one ain form and a continuous subform displayed on the same screen. I am able to search for a record and display the results for that record in the main and sub forms, but I have to tab trhough all the fields on the main form to get to the subform.
What I would like to do is display all the info in both forms and have the cursor be on a new record in the subform.
When I tab through the fields it is doing this but I want to get rid of the tabbing. Any ideas?
Here is my coding:
Private Sub Search_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.Search) Then
' Save before move.
If Me.Dirty Then
Me.Undo
Me.Dirty = False
End If
' Search in the clone set.
Set rs = Me.Recordset.Clone
rs.MoveFirst
rs.FindFirst "[License] = """ & Me![Search] & """"
If rs.NoMatch Then
DoCmd.Beep
' Take Search results and place them in the License box
DoCmd.GoToRecord , , acNewRec
License = Search
Me.State.SetFocus
MsgBox "License not found in Database!"
Else
' Display record in the form
Me.Bookmark = rs.Bookmark
rs.MoveLast
End If
Set rs = Nothing
End If
End Sub
Please give me a hand on this. It has been bugging me for about 2 weeks now. Thanks for you help in advance.
JC Willette


Here is my coding:
Private Sub Search_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.Search) Then
' Save before move.
If Me.Dirty Then
Me.Undo
Me.Dirty = False
End If
' Search in the clone set.
Set rs = Me.Recordset.Clone
rs.MoveFirst
rs.FindFirst "[License] = """ & Me![Search] & """"
If rs.NoMatch Then
DoCmd.Beep
' Take Search results and place them in the License box
DoCmd.GoToRecord , , acNewRec
License = Search
Me.State.SetFocus
MsgBox "License not found in Database!"
Else
' Display record in the form
Me.Bookmark = rs.Bookmark
rs.MoveLast
End If
Set rs = Nothing
End If
End Sub
Please give me a hand on this. It has been bugging me for about 2 weeks now. Thanks for you help in advance.
JC Willette