Hello,
I am working on an Access 2003 Database. The tables that pertain to this issue are tblOrg, tblState, tblCity, and tblZip. I have posted the table structure with only the pertinant fields below.
tblOrg
OrgID, AutoNumber, PK
ZipID, Number, FK
tblState
StateID, AutoNumber, PK
State, text
tblCity
CityID, AutoNumber, PK
City, text
StateID, Number, FK
tblZip
ZipID, AutoNumber, PK
Zip, text
CityID, Number, FK
In working with cascading combo boxes in a different database it was suggested to me that recording the StateID, CityID and ZipID in the Organization table was redundant (and not good database practice) and that I only had to store the Zip ID in the tblOrg and the broader levels could be recalled later through the relationships of the tblState, tblCity and tblZip. Upon considering this it makes sense to me so I have set up my tables to reflect this logic, but now I am having difficulty getting my cascading comboboxes to work.
I am now creating a form (frmCom), bound to tblOrg, that I plan to use for data entry and review. My hope is that a user will be able to select the State, then the City and finally the Zip from cascading combo boxes and that the information entered in the zip field will store in the tblOrg and used to fill in the broader categories when the information is reviewed.
I have placed two unbound combobox fields on this form, one for state and the other for city. The zip combobox is bound to zipID of tblOrg. The rowsource for cboState is tblState(bound coloum StateID, state name, widths 0;1). This box seems to work fine. The rowsource for cboCity is tblCity (bound colum CityID, city name, StateID from FrmCom.cbostate , widths 0;1;0) However, when I click on the city field I am prompted for frmCom.cbostate . If I enter the StateID into the prompt, the list propogates correctly but I'm would like it to pull that information from the form and not require manual entry.
A Similar thing is happening with the zip combobox, however the prompt for the city occurs when I open the frmCom, not when I click on the zip field. If I enter the CityID then, the zip list propogates, if I cancel the prompt when I click on the Zip list it is left blank.
I'm not sure why my cascade is not seeing the information in the forms fields. I'm not sure if it has to do with how the form is bound to information (it is looking to run the cascase in the other direction aka retreval, but not forward for dataentry), or if it has to do with the way I have my cascade set up.
Any advice on what I should be looking at or what might be occuring would be appreciated.
I am working on an Access 2003 Database. The tables that pertain to this issue are tblOrg, tblState, tblCity, and tblZip. I have posted the table structure with only the pertinant fields below.
tblOrg
OrgID, AutoNumber, PK
ZipID, Number, FK
tblState
StateID, AutoNumber, PK
State, text
tblCity
CityID, AutoNumber, PK
City, text
StateID, Number, FK
tblZip
ZipID, AutoNumber, PK
Zip, text
CityID, Number, FK
In working with cascading combo boxes in a different database it was suggested to me that recording the StateID, CityID and ZipID in the Organization table was redundant (and not good database practice) and that I only had to store the Zip ID in the tblOrg and the broader levels could be recalled later through the relationships of the tblState, tblCity and tblZip. Upon considering this it makes sense to me so I have set up my tables to reflect this logic, but now I am having difficulty getting my cascading comboboxes to work.
I am now creating a form (frmCom), bound to tblOrg, that I plan to use for data entry and review. My hope is that a user will be able to select the State, then the City and finally the Zip from cascading combo boxes and that the information entered in the zip field will store in the tblOrg and used to fill in the broader categories when the information is reviewed.
I have placed two unbound combobox fields on this form, one for state and the other for city. The zip combobox is bound to zipID of tblOrg. The rowsource for cboState is tblState(bound coloum StateID, state name, widths 0;1). This box seems to work fine. The rowsource for cboCity is tblCity (bound colum CityID, city name, StateID from FrmCom.cbostate , widths 0;1;0) However, when I click on the city field I am prompted for frmCom.cbostate . If I enter the StateID into the prompt, the list propogates correctly but I'm would like it to pull that information from the form and not require manual entry.
A Similar thing is happening with the zip combobox, however the prompt for the city occurs when I open the frmCom, not when I click on the zip field. If I enter the CityID then, the zip list propogates, if I cancel the prompt when I click on the Zip list it is left blank.
I'm not sure why my cascade is not seeing the information in the forms fields. I'm not sure if it has to do with how the form is bound to information (it is looking to run the cascase in the other direction aka retreval, but not forward for dataentry), or if it has to do with the way I have my cascade set up.
Any advice on what I should be looking at or what might be occuring would be appreciated.
Comment