T
Tom
I have an unbound textbox and a command button "GoToRecord" on a form.
When I enter an AutoNumber RecordID (e.g. "50") into the unbound textbox and
then click "GoToRecord", I move to the particular record... works great thus
far.
However, once I made a change on record "50" and then enter "100" in the
unbound text and click "GoToRecord" again, nothing happens (I remain on 50
vs. jumping to 100).
Well, I actually get the following 2 dialog boxes (errors):
First: "Update or CancelUpdate without AddNew or Edit."
Then: "You can't save record at this time. Yes or No"
Does anyone how I can adjust the function below so that I can do the
following:
- enter 50
- click GoTo... I jump to record 50
- make a change on record 50
- I enter 100
- click GoTo... I jump to record 100
- and so on...
Thanks,
Tom
Here's my current function:
===========================
Private Sub GoToRecord_Click()
If Me.RecordID.Value <> "" Then
Me.RecordID.Enabled = True
Me.RecordsetClone.FindFirst "[RecordID]=" & Me!FindRecordID
If Not Me.RecordsetClone.NoMatch Then Me.Bookmark =
Me.RecordsetClone.Bookmark
Else
Me.RecordID.Enabled = False
End If
'Takes focus off command button
Me.cboDivision.SetFocus
'Reset properties for finding records
Me.FindRecordID.Value = ""
Me.GoToRecord.Enabled = False
End Sub
When I enter an AutoNumber RecordID (e.g. "50") into the unbound textbox and
then click "GoToRecord", I move to the particular record... works great thus
far.
However, once I made a change on record "50" and then enter "100" in the
unbound text and click "GoToRecord" again, nothing happens (I remain on 50
vs. jumping to 100).
Well, I actually get the following 2 dialog boxes (errors):
First: "Update or CancelUpdate without AddNew or Edit."
Then: "You can't save record at this time. Yes or No"
Does anyone how I can adjust the function below so that I can do the
following:
- enter 50
- click GoTo... I jump to record 50
- make a change on record 50
- I enter 100
- click GoTo... I jump to record 100
- and so on...
Thanks,
Tom
Here's my current function:
===========================
Private Sub GoToRecord_Click()
If Me.RecordID.Value <> "" Then
Me.RecordID.Enabled = True
Me.RecordsetClone.FindFirst "[RecordID]=" & Me!FindRecordID
If Not Me.RecordsetClone.NoMatch Then Me.Bookmark =
Me.RecordsetClone.Bookmark
Else
Me.RecordID.Enabled = False
End If
'Takes focus off command button
Me.cboDivision.SetFocus
'Reset properties for finding records
Me.FindRecordID.Value = ""
Me.GoToRecord.Enabled = False
End Sub