Saving a form with unbound fields using VBA

grundig1987

Registered User.
Local time
Today, 00:19
Joined
Dec 22, 2010
Messages
31
Good day all,

This is my first time using Access Forums - My name is Mark, and I hope you can help me with a problem I am having.

I have a form with a single control source, several combo boxes with record sources only based on queries, but these combo boxes do not have control sources (the reason being they require validation prior to entering them into the control source table) - Where I am having a problem is saving the form as it was completed, if that makes sense.

I have allowed the user the option to enter their 'StudentID' - If the Student ID exists in the control source (enrolments), the form will open up, but rather than going to a blank form, should open up on the form where the StudentID matches what the user entered.

The code I am using is below:

DoCmd.OpenForm "OptionDetailForm", , , "[StudentID]='" & Student_ID & "'"

I am 99% sure the code itself is right because I have used the exact same code at another stage of this project, just with different fields, and it has worked perfectly. Furthermore, when I open the form in form view and try to click left or right to view existing forms, there are none - well I say none, the forms are actually numbered 1, 2, 3 etc, but there is no data in the combo boxes, presumably because none of the combo boxes are bound to fields specifically. Is there any way to get around this?

Thanks in anticipation of your assistance.

Mark
 

Users who are viewing this thread

Back
Top Bottom