robtyketto
Registered User.
- Local time
- Today, 21:51
- Joined
- Nov 22, 2006
- Messages
- 21
Greetings,
I have a main form. Upon filling in a combo box it then displays a subform (based on a query that uses values in the combo box on where clause)
THe subform has the paramater Data Entry = 'No' as I want users to see all existing records and all additions/deletions and edits.
However I want to move to the last record to default, allowing the user to add a record without navigating themselves to the last record.
A popular request, so found code (see below)
When testing the subform is populated with 1 or more rows but the debug message is NEVER displayed. If i remove the IF condition it complains with message "3021 : No current record"
I cant even print the current record when im in the subform to see whats happening.
Can anyone please advice and assist?
Thanks
Rob
I have a main form. Upon filling in a combo box it then displays a subform (based on a query that uses values in the combo box on where clause)
THe subform has the paramater Data Entry = 'No' as I want users to see all existing records and all additions/deletions and edits.
However I want to move to the last record to default, allowing the user to add a record without navigating themselves to the last record.
A popular request, so found code (see below)
Code:
Private Sub cboDeliveryName_AfterUpdate()
Me.qryStudentsResultsDeliverysubform1.Enabled = True
Me.qryStudentsResultsDeliverysubform1.Visible = True
Me.qryStudentsResultsDeliverysubform1.SetFocus
With Me.qryStudentsResultsDeliverysubform1.Form.RecordsetClone
If Not .BOF Then
.MoveLast
MsgBox "In here"
Me.qryStudentsResultsDeliverysubform1.Form.Bookmark = .Bookmark
End If
End With
End Sub
When testing the subform is populated with 1 or more rows but the debug message is NEVER displayed. If i remove the IF condition it complains with message "3021 : No current record"
I cant even print the current record when im in the subform to see whats happening.
Can anyone please advice and assist?
Thanks
Rob