G
Guest
I have a form [FA1_OrgMaster] that has a Combo Box [cboCounties].
The cbo's Row Source is a Query with 2 columns - [TYaa_CountyNumber] -
Integer, and [TYaa_CountyName] - Text 50 characters. The first column -
CountyNumber - is Bound, but only the 2nd is displayed to the user in the cbo.
I have a Form Open Event Procedure - but it doesn't affect the cbo.
I have a Form Load Procedure that does:
_______________
Private Sub Form_Load()
On Error GoTo HandleError
Me!cboOrgs = Null
Me!cboCounties = Null
Me!cboCounties = "Choose County"
Me!cboCounties.SetFocus
Exit Sub
HandleError:
...
Exit Sub
End Sub
_______________________
I've clicked the cbo, oh maybe 1000 times. Works perfectly about 95% of the
time - but I get an error message without an error number about 5% of the
time - "Wrong Data Type or Too Many Characters ...".
I can't see a pattern leading to the error. I've gotten the error when:
* click the cbo immediately I open the Form from the Database Window
* go from Design back to Form View and immediately click the cbo
* click the cbo after I've been jumping all around the form, entering data,
etc
But most of the time I do those things I don't get the error. I've never
been able to replicate the error by repeating what I think I did.
When I get the error message and click OK, sometimes the Cbo "drops down"
immediately. Other times I have to click the down arrow on the cbo. So - even
with the error message, the program proceeds normally without my having made
any changes other than click "OK" on the error message.
I'm stumped. Any ideas?
Thanks
John D
The cbo's Row Source is a Query with 2 columns - [TYaa_CountyNumber] -
Integer, and [TYaa_CountyName] - Text 50 characters. The first column -
CountyNumber - is Bound, but only the 2nd is displayed to the user in the cbo.
I have a Form Open Event Procedure - but it doesn't affect the cbo.
I have a Form Load Procedure that does:
_______________
Private Sub Form_Load()
On Error GoTo HandleError
Me!cboOrgs = Null
Me!cboCounties = Null
Me!cboCounties = "Choose County"
Me!cboCounties.SetFocus
Exit Sub
HandleError:
...
Exit Sub
End Sub
_______________________
I've clicked the cbo, oh maybe 1000 times. Works perfectly about 95% of the
time - but I get an error message without an error number about 5% of the
time - "Wrong Data Type or Too Many Characters ...".
I can't see a pattern leading to the error. I've gotten the error when:
* click the cbo immediately I open the Form from the Database Window
* go from Design back to Form View and immediately click the cbo
* click the cbo after I've been jumping all around the form, entering data,
etc
But most of the time I do those things I don't get the error. I've never
been able to replicate the error by repeating what I think I did.
When I get the error message and click OK, sometimes the Cbo "drops down"
immediately. Other times I have to click the down arrow on the cbo. So - even
with the error message, the program proceeds normally without my having made
any changes other than click "OK" on the error message.
I'm stumped. Any ideas?
Thanks
John D