M
Mike Webb
Using Access 2K2
Experience Level: Beginner
Problems: (1) I don't know how to the PK autonumber to advance to the next
available number. (2) I don't know how to save the new entry on my form. (3)
I don't know how to setup my listbox in the subform to allow 2 or more
choices.
Tables behind the form: tblAddressList (contains all info on a Contact);
tblAddressListCategories (contains the category (ies) that a Contact will
fall into - can easily be more than one; for example, the Contact can be a
"major donor", "member of Advisory Board", and belong to "US Fish & Wildlife
Service); tblJoinAddressListCategories (contains PK's of first 2 tables as
FK's).
Form uses tblAddressList, and subform the other 2 tables. (I used the Form
Wizard to create this). I added every field from all 3 tables, and then
made some of them invisible or hid the columns.
The data/row source of the items in the Form are fields in tblAddressList.
The data/row source of the sole visible field in the SubForm is from
tblAddressListCategories.
I am using a Listbox in the subform and it shows all the choices from the
referenced table field. I choose one from the list, but have no way to
choose another.
I made the PK for the table behind the Form visible, but locked it (after I
took a quick look at the Northwinds sample db to see how it was done on one
of their forms.) I then entered some sample data and, for want of a means
to close it, tried to close the form. I got a dialog box telling me "Index
or primary key cannot contain a Null value."
I looked over some websites from the Access MVP site, Googled this newsgroup
using "data entry" as a search term, and looked over Access Help. Couldn't
find what I need to correct the problems and move forward.
Would someone please share their comments or advice on how I should proceed?
Cordially,
Mike Webb
Platte River Whooping Crane Maintenance Trust, Inc.
a 501(c)(3) organization
Experience Level: Beginner
Problems: (1) I don't know how to the PK autonumber to advance to the next
available number. (2) I don't know how to save the new entry on my form. (3)
I don't know how to setup my listbox in the subform to allow 2 or more
choices.
Tables behind the form: tblAddressList (contains all info on a Contact);
tblAddressListCategories (contains the category (ies) that a Contact will
fall into - can easily be more than one; for example, the Contact can be a
"major donor", "member of Advisory Board", and belong to "US Fish & Wildlife
Service); tblJoinAddressListCategories (contains PK's of first 2 tables as
FK's).
Form uses tblAddressList, and subform the other 2 tables. (I used the Form
Wizard to create this). I added every field from all 3 tables, and then
made some of them invisible or hid the columns.
The data/row source of the items in the Form are fields in tblAddressList.
The data/row source of the sole visible field in the SubForm is from
tblAddressListCategories.
I am using a Listbox in the subform and it shows all the choices from the
referenced table field. I choose one from the list, but have no way to
choose another.
I made the PK for the table behind the Form visible, but locked it (after I
took a quick look at the Northwinds sample db to see how it was done on one
of their forms.) I then entered some sample data and, for want of a means
to close it, tried to close the form. I got a dialog box telling me "Index
or primary key cannot contain a Null value."
I looked over some websites from the Access MVP site, Googled this newsgroup
using "data entry" as a search term, and looked over Access Help. Couldn't
find what I need to correct the problems and move forward.
Would someone please share their comments or advice on how I should proceed?
Cordially,
Mike Webb
Platte River Whooping Crane Maintenance Trust, Inc.
a 501(c)(3) organization