When my user enters a new child record, the last tab page causes the linking key to the parent record to be erased. The user selects the Source of Business from a drop down box; the cursor is moved to the end of the pre-defined text so additional info can be entered. Upon changing to any other field on the form to enter additional data the linking key value is lost. This does not happen every time, and it only happens when the Source of Business selection is made first.
The event code on the Source of Business field is
Private Sub ISBCodeCmbo_AfterUpdate()
Dim FindSBCode As String
FindSBCode = Me!ISBCodeCmbo
Dim dbs As DATABASE
Dim rst As Recordset
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("SourceOfBusiness", dbOpenForwardOnly)
Do While Not rst.EOF
If rst!SBCode = FindSBCode Then
Me![ISBText] = [rst]![SBText]
Me!ISBText.SetFocus
SendKeys "{END}{ }"
Exit Do
Else
rst.MoveNext
End If
Loop
rst.Close
End Sub
There is no event code attached to the text field associated with the SoB field. There is no Form events that effect this tab page.
The Access 97 program is running on an NT server with 6 computers running various versions of Windows.
I cannot duplicate the problem on my computers in my office.
My assumption is that a setting somewhere on the network or in Access 97 is causing the problem.
All help will be greatly appreciated.
The event code on the Source of Business field is
Private Sub ISBCodeCmbo_AfterUpdate()
Dim FindSBCode As String
FindSBCode = Me!ISBCodeCmbo
Dim dbs As DATABASE
Dim rst As Recordset
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("SourceOfBusiness", dbOpenForwardOnly)
Do While Not rst.EOF
If rst!SBCode = FindSBCode Then
Me![ISBText] = [rst]![SBText]
Me!ISBText.SetFocus
SendKeys "{END}{ }"
Exit Do
Else
rst.MoveNext
End If
Loop
rst.Close
End Sub
There is no event code attached to the text field associated with the SoB field. There is no Form events that effect this tab page.
The Access 97 program is running on an NT server with 6 computers running various versions of Windows.
I cannot duplicate the problem on my computers in my office.
My assumption is that a setting somewhere on the network or in Access 97 is causing the problem.
All help will be greatly appreciated.