By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,677 Members | 1,060 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,677 IT Pros & Developers. It's quick & easy.

Access 2007 help

P: n/a
I recently installed Access 2007; I've been a long time user of access (from
ver 1 ). The following code snippet is giving me fits-
<<
Select Case myTide
Case 1

Select Case myTideStage
Case 1
MsgBox "Tide Stage must be either After Low or Before High"
Me![cboStage] = " "
>>
This is triggered by the Before Update event on a combo box in a search
form; I' m trying to set the combo box back to blank if my Search criteria
is not met. I alway used "" to do this in past versions of Access
(LinkChildFields, etc) with no problems; with the above, I'm getting a
run-time error 2115..............I also tried Me![cboStage] = 1 and it still
failed....am I missing something here??

any other way to return the combo box to empty?....

-Joe
Jan 11 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Joseph Macari" <jm******@cox.netwrote in
news:pl*******************@newsfe21.lga:
I recently installed Access 2007; I've been a long time user of access
(from ver 1 ). The following code snippet is giving me fits-
<<
Select Case myTide
Case 1

Select Case myTideStage
Case 1
MsgBox "Tide Stage must be either After Low or Before
High" Me![cboStage] = " "
>>>
This is triggered by the Before Update event on a combo box in a
search form; I' m trying to set the combo box back to blank if my
Search criteria is not met. I alway used "" to do this in past
versions of Access (LinkChildFields, etc) with no problems; with the
above, I'm getting a run-time error 2115..............I also tried
Me![cboStage] = 1 and it still failed....am I missing something here??

any other way to return the combo box to empty?....
In other Access versions did you use it in BeforeUpdate Event Code? I can
see that it must be very confusing to Access if it's working on a procedure
that confirms changing the value of something to "Cat", and that procedure
tells it to change its value to "Dog".
Depending on whether or not your combo box is bound you might be able to
use the OnClick or AfterUpdate event.

--
lyle fairfield
Jan 11 '07 #2

P: n/a
well, i don't know about A2007, but in previous versions i would use

Me!cboStage.Undo

or

Me!cboStage = Null

hth
"Joseph Macari" <jm******@cox.netwrote in message
news:pl*******************@newsfe21.lga...
I recently installed Access 2007; I've been a long time user of access
(from
ver 1 ). The following code snippet is giving me fits-
<<
Select Case myTide
Case 1

Select Case myTideStage
Case 1
MsgBox "Tide Stage must be either After Low or Before High"
Me![cboStage] = " "
>
This is triggered by the Before Update event on a combo box in a search
form; I' m trying to set the combo box back to blank if my Search
criteria
is not met. I alway used "" to do this in past versions of Access
(LinkChildFields, etc) with no problems; with the above, I'm getting a
run-time error 2115..............I also tried Me![cboStage] = 1 and it
still
failed....am I missing something here??

any other way to return the combo box to empty?....

-Joe


Jan 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.