hockey8837
Registered User.
- Local time
- Today, 11:14
- Joined
- Sep 16, 2009
- Messages
- 106
I have made a form for my DB which I've built two combo boxes, one dependent upon the other.
the first combo box's row source draws a select query:
it has a macro in the ON CHANGE event:
the second combo box's row source is:
My basic goal was to be able to select a target planting date, and limit the list in the zip code combo box to only those locations with that target date.
This works great except for one thing- say the user makes a selection of a target date, then selects an appropriate zip, then, changes their mind and wants to pick a different date. When the user goes back to click the 'target date' combo the following error message appears:
"The database engine could not lock table 'ztblZip' because it is already in use by another person or process."
Why am I getting this, and how can I change/fix it??
I've attached a thinned down copy of my db with the pertinent tables/queries/forms (the reports it generates are not necessary)...
the first combo box's row source draws a select query:
Code:
SELECT tlkpFunding.TargetPlantingDate FROM tlkpFunding GROUP BY tlkpFunding.TargetPlantingDate;
it has a macro in the ON CHANGE event:
Code:
Set Warnings-No
Open query- qryZipBasedOffDate, Datasheet, Edit
Close - Query, qryZipBasedOffDate, Prompt '"qryZipBasedOffDate is a make table query-it populates ztblZip"'
Close - Table, ztblZip, Prompt
Set Warnings-No
the second combo box's row source is:
Code:
SELECT ztblZip.LocationZip FROM ztblZip;
My basic goal was to be able to select a target planting date, and limit the list in the zip code combo box to only those locations with that target date.
This works great except for one thing- say the user makes a selection of a target date, then selects an appropriate zip, then, changes their mind and wants to pick a different date. When the user goes back to click the 'target date' combo the following error message appears:
"The database engine could not lock table 'ztblZip' because it is already in use by another person or process."
Why am I getting this, and how can I change/fix it??
I've attached a thinned down copy of my db with the pertinent tables/queries/forms (the reports it generates are not necessary)...