Heatshiver
Registered User.
- Local time
- Today, 14:59
- Joined
- Dec 23, 2011
- Messages
- 263
The purpose of my combobox is that when a user needs to change information or use the same values and save to a different date, the user can use the combobox and find the date they need.
At the moment I have two forms: frmUserID & frmGenSum
frmUserID pops up first and a valid user ID must be inputted. Once it is, they can click a button that opens frmGenSum. frmGenSum then has the combobox. The user can click on its dropdown arrow and see all the previous dates they had used and pick accordingly. The form is then meant to change to show the date selected along with the general information that had been inputted for that date. They could then change the information.
I have a WHERE clause in SQL for the combobox on frmGenSum to show only dates for the user ID entered on frmUserID. And the combobox has the following code:
DoCmd.FindRecord Me!ctlSearch, acEntire
My problem is that I can only seem to allow past dates to be clicked for the first user ("0001"), but any other will always give me the Error 3022 when selecting a previously used date. It points to the combobox code as the problem... On top of that, I can't get user 0001 to save the previous data as a different date without freezing and crashing Access. If I'm lucky and Access doesn't crash, it will manage to save after the error, but merely replaces the date chosen for that record instead of creating a new record with that date. It will allow user 0001 to change and add data to the date chosen however.
I can live without having the user use the old data for a new date, but I really need to be able to pull up the old data for other users to change if necessary. Any help would be much appreciated, this has been driving me nuts! Thank you.
At the moment I have two forms: frmUserID & frmGenSum
frmUserID pops up first and a valid user ID must be inputted. Once it is, they can click a button that opens frmGenSum. frmGenSum then has the combobox. The user can click on its dropdown arrow and see all the previous dates they had used and pick accordingly. The form is then meant to change to show the date selected along with the general information that had been inputted for that date. They could then change the information.
I have a WHERE clause in SQL for the combobox on frmGenSum to show only dates for the user ID entered on frmUserID. And the combobox has the following code:
DoCmd.FindRecord Me!ctlSearch, acEntire
My problem is that I can only seem to allow past dates to be clicked for the first user ("0001"), but any other will always give me the Error 3022 when selecting a previously used date. It points to the combobox code as the problem... On top of that, I can't get user 0001 to save the previous data as a different date without freezing and crashing Access. If I'm lucky and Access doesn't crash, it will manage to save after the error, but merely replaces the date chosen for that record instead of creating a new record with that date. It will allow user 0001 to change and add data to the date chosen however.
I can live without having the user use the old data for a new date, but I really need to be able to pull up the old data for other users to change if necessary. Any help would be much appreciated, this has been driving me nuts! Thank you.