Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange things happening in my form...

Status
Not open for further replies.

jrabenhorst

IS-IT--Management
Apr 13, 2005
53
US
I created a basic database that our company has been using for the past few months, but very recently our input form has been acting strangly. When I open the form, I use a combo box to search for a record. After that record pops up, I update a field called Case Number, then I press enter, scroll back one record on my mouse wheel then forward again back to my original record and the case number is gone and has somehow copied itself to the following record! What is going on here? Does anyone have any idea what is happening?
 
We would have to see your forms code. It may be doing exactly what you coded it to do. One question, does this happen if you scroll back without using the mouse wheel?
 
Here is the code for the form... I'm not sure if this happens when I don't use the wheel. I'll have to try it...

Option Compare Database

Private Sub Command24_Click()
On Error GoTo Err_Command24_Click

Dim stDocName As String

stDocName = "DEATHCLAIMENVELOPEFINAL"
DoCmd.OpenReport stDocName, acPreview

Exit_Command24_Click:
Exit Sub

Err_Command24_Click:
MsgBox Err.Description
Resume Exit_Command24_Click

End Sub
Private Sub Command26_Click()
On Error GoTo Err_Command26_Click

Dim stDocName As String

stDocName = "check"
DoCmd.OpenReport stDocName, acPreview

Exit_Command26_Click:
Exit Sub

Err_Command26_Click:
MsgBox Err.Description
Resume Exit_Command26_Click

End Sub
Private Sub Combo36_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[RegisterNumber] = " & Str(Nz(Me![Combo36], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Private Sub Combo38_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[RegisterNumber] = " & Str(Nz(Me![Combo38], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Private Sub Command43_Click()
On Error GoTo Err_Command43_Click

Dim stDocName As String

stDocName = "Macro4"
DoCmd.RunMacro stDocName

Exit_Command43_Click:
Exit Sub

Err_Command43_Click:
MsgBox Err.Description
Resume Exit_Command43_Click

End Sub
Private Sub Combo44_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[RegisterNumber] = " & Str(Nz(Me![Combo44], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Private Sub Combo46_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[RegisterNumber] = " & Str(Nz(Me![Combo46], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Private Sub Combo50_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[RegisterNumber] = " & Str(Nz(Me![Combo50], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Private Sub Command57_Click()
On Error GoTo Err_Command57_Click

Dim stDocName As String

stDocName = "PendingDeathClaim"
DoCmd.OpenReport stDocName, acPreview

Exit_Command57_Click:
Exit Sub

Err_Command57_Click:
MsgBox Err.Description
Resume Exit_Command57_Click

End Sub
Private Sub Combo60_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[RegisterNumber] = " & Str(Nz(Me![Combo60], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Private Sub Command65_Click()
On Error GoTo Err_Command65_Click

Dim stDocName As String

stDocName = "PaymentDue"
DoCmd.OpenReport stDocName, acPreview

Exit_Command65_Click:
Exit Sub

Err_Command65_Click:
MsgBox Err.Description
Resume Exit_Command65_Click

End Sub
Private Sub Command66_Click()
On Error GoTo Err_Command66_Click

Dim stDocName As String

stDocName = "RFHPaymentDue"
DoCmd.OpenReport stDocName, acPreview

Exit_Command66_Click:
Exit Sub

Err_Command66_Click:
MsgBox Err.Description
Resume Exit_Command66_Click

End Sub
Private Sub Command68_Click()
On Error GoTo Err_Command68_Click


DoCmd.Quit

Exit_Command68_Click:
Exit Sub

Err_Command68_Click:
MsgBox Err.Description
Resume Exit_Command68_Click

End Sub
Private Sub Command69_Click()
On Error GoTo Err_Command69_Click

Dim stDocName As String

stDocName = "RFHDeathClaimEnvelopeFinal"
DoCmd.OpenReport stDocName, acPreview

Exit_Command69_Click:
Exit Sub

Err_Command69_Click:
MsgBox Err.Description
Resume Exit_Command69_Click

End Sub
Private Sub Command70_Click()
On Error GoTo Err_Command70_Click

Dim stDocName As String

stDocName = "White Slip"
DoCmd.OpenReport stDocName, acPreview

Exit_Command70_Click:
Exit Sub

Err_Command70_Click:
MsgBox Err.Description
Resume Exit_Command70_Click

End Sub
Private Sub Command72_Click()
On Error GoTo Err_Command72_Click

Dim stDocName As String

stDocName = "RFHUpdateDatabase"
DoCmd.OpenQuery stDocName, acNormal, acEdit

Exit_Command72_Click:
Exit Sub

Err_Command72_Click:
MsgBox Err.Description
Resume Exit_Command72_Click

End Sub
Private Sub Command73_Click()
On Error GoTo Err_Command73_Click

Dim stDocName As String

stDocName = "WhiteSlip"
DoCmd.OpenReport stDocName, acPreview

Exit_Command73_Click:
Exit Sub

Err_Command73_Click:
MsgBox Err.Description
Resume Exit_Command73_Click

End Sub
Private Sub Command74_Click()
On Error GoTo Err_Command74_Click


DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

Exit_Command74_Click:
Exit Sub

Err_Command74_Click:
MsgBox Err.Description
Resume Exit_Command74_Click

End Sub
 
I can not see any problem that would happen in this code. You only have 2 types of routines; one opens another form, the other finds a record. Nothing that assigns value to a control. So I have to think. Test the scroll without the mouse wheel and get back.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top