Problem with AutoNumber on form:

Oimoi

Registered User.
Local time
Today, 05:29
Joined
Jul 17, 2011
Messages
42
Afternoon all!

I've been trying to create a Registration form (e.g. enrolling students into a class), and I just keep running into problems.

So far, I have tables "Student" and "Class", and a third junction table called "Registration" with a composite primary key. I created a form based off of my "Registration" table, and I want to be able to select the Student ID and Class Code from a drop-down list, then input data for other fields pertaining to payment.

My problem is that the Student ID's datatype is AutoNumber, so it won't let me edit/manually type in the ID that I want into the form. I tried making the combo box unbound, but then it just gives me the error message "Index or Primary Key Cannot Contain a Null Value." I WANT to be able to enroll a specific student through this registration form, but how do I get past this AutoNumber problem?

I'd appreciate any help at all! And kudos to anyone who reads and comprehends my drivel.
 
StudentID in the Regsitration table surely is just a Number and not Autonumber? The same applies to ClassCode in your registration table
 
Thanks for responding. :)

And StudentID is actually set to AutoNumber on the Registration table. If I set it to Number, would the relationships still hold? Gonna mess with that right now.
 
Oh, wow. That's all it took. Simply changed the datatype for the StudentID to Number on the Registration table. Thank you so much!

Now I just need to figure out how to enroll one student in multiple classes through the same form, versus having to fill in the same form several times for different classes. I already got some help from an earlier thread, so gonna play around with those suggestions.

Thanks again. :o
 

Users who are viewing this thread

Back
Top Bottom