jammin140900
Registered User.
- Local time
- Tomorrow, 06:47
- Joined
- Aug 18, 2008
- Messages
- 35
Hi All,
I have a subform in datasheet view with two combo boxes. The first represents a Company Name, the second contains the contact person/s for a company. I have currently set up so that when entering a company name, the second combo box will requery and only display contact people from the selected company.
To do this, I have the following query that sits behind the second combo box
SELECT qryfrmAuditorSelection.AuditorID, qryfrmAuditorSelection.AuditorSign, qryfrmAuditorSelection.AuditorSubID
FROM qryfrmAuditorSelection
WHERE (((qryfrmAuditorSelection.AuditorID)=[Forms]![frmAuditing]![frmAuditingSub].[Form]![Combo44]))
ORDER BY qryfrmAuditorSelection.AuditorSign;
To complete the process, I have a
Private Sub Combo44_AfterUpdate()
Me.Combo46.Requery
End Sub
to requery the data in preparation for the second combo box selection. That works fine.
Problem occurs when you try entering the next company in, the subform goes back to the first record instead of staying with the current record. Could anyone please help me with code to keep the subform at the current record after the requery? I've looked through a few threads on similar things and tried a few things but I cannot get it to work.
Thank you in anticipation!
I have a subform in datasheet view with two combo boxes. The first represents a Company Name, the second contains the contact person/s for a company. I have currently set up so that when entering a company name, the second combo box will requery and only display contact people from the selected company.
To do this, I have the following query that sits behind the second combo box
SELECT qryfrmAuditorSelection.AuditorID, qryfrmAuditorSelection.AuditorSign, qryfrmAuditorSelection.AuditorSubID
FROM qryfrmAuditorSelection
WHERE (((qryfrmAuditorSelection.AuditorID)=[Forms]![frmAuditing]![frmAuditingSub].[Form]![Combo44]))
ORDER BY qryfrmAuditorSelection.AuditorSign;
To complete the process, I have a
Private Sub Combo44_AfterUpdate()
Me.Combo46.Requery
End Sub
to requery the data in preparation for the second combo box selection. That works fine.
Problem occurs when you try entering the next company in, the subform goes back to the first record instead of staying with the current record. Could anyone please help me with code to keep the subform at the current record after the requery? I've looked through a few threads on similar things and tried a few things but I cannot get it to work.
Thank you in anticipation!