nschroeder
nschroeder
- Local time
- Today, 11:48
- Joined
- Jan 8, 2007
- Messages
- 186
Greetings. I have searched the posts and seen this issue brought up several times, but have not found a clear answer. It appeared that the respondents possibly didn't clearly understand the issue, so no offense, but I'm going to try again.
In a form with cascading combo boxes, why does the selected value in the 2nd box disappear on (other) records where the selected value in the 1st box does not match the selected value in the current record? The cascading combos work fine, and the other records still contain the correct value. It's just that they appear blank on the screen until you select that record, and then the value for the record you just left goes blank. For the row source of the 2nd box, I'm using a query with a selection criteria of the value from the 1st box on the form.
The problem only occurs when the lookup table for the 2nd box has an autonumber PK, and the box column width for the first column is 0 (0";1"). If I change the column width to something like .1";1" then the problem goes away, but of course then you just see numbers in the control instead of the values you want.
I have attached a sample db to illustrate the issue. If you open the MainData1 form and select different records, you'll see the values in SubCat appear and disappear accordingly. In the MainData2 form, the problem doesn't occur, but you only see the autonumber values. The only difference between the two forms is the columnwidth on the SubCat control. Note that I have the requery command on both the Current and AfterUpdate events.
Thanks for your help
In a form with cascading combo boxes, why does the selected value in the 2nd box disappear on (other) records where the selected value in the 1st box does not match the selected value in the current record? The cascading combos work fine, and the other records still contain the correct value. It's just that they appear blank on the screen until you select that record, and then the value for the record you just left goes blank. For the row source of the 2nd box, I'm using a query with a selection criteria of the value from the 1st box on the form.
The problem only occurs when the lookup table for the 2nd box has an autonumber PK, and the box column width for the first column is 0 (0";1"). If I change the column width to something like .1";1" then the problem goes away, but of course then you just see numbers in the control instead of the values you want.
I have attached a sample db to illustrate the issue. If you open the MainData1 form and select different records, you'll see the values in SubCat appear and disappear accordingly. In the MainData2 form, the problem doesn't occur, but you only see the autonumber values. The only difference between the two forms is the columnwidth on the SubCat control. Note that I have the requery command on both the Current and AfterUpdate events.
Thanks for your help