
Signature
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
Let me see if I can explain the situation better. I have a form with 2 ption
buttons and one combobox. The choice of the option button determines what is
avaliable for selection in the combobox.
If the user selects the project option button, the combobox have avaliable
project numbers, which are strictly number. If the user selects the Site
option button, the combobox have avaliable site numbers, which are
combination of numbers and letters, alphanumeric (or text).
When the form opens and I select the Site option first, everything works ok.
That means no errors to hang-ups, nothing. But if I select the project option
first, the is no problem when I make a selection in the combobox. The problem
and erroe arises whan I try to change my selection.
Lets say for instance I made a mistake by selecting the project option
button, or I changed my mind and decided that I wanted to run the site
option. If I now select the site option,after selecting the project option
and selected a project number in the combobox. If i now select the site
option and try o select the site ID number in the combobox, this is when I
get the error message and the program grid to an halt.
This is why I was hoping I could find a fix or a better way around this
problem that doesn't involve creating 2 comboboxes for either option.
> Ayo,
> The Format of a numeric field only applies to how a number is displayed,
[quoted text clipped - 11 lines]
> > will will be recognized as a text data type.
> > Thanks
rquintal@sympatico.ca - 14 Jan 2008 17:56 GMT
> Let me see if I can explain the situation better. I have a form with 2 ption
> buttons and one combobox. The choice of the option button determines what is
[quoted text clipped - 41 lines]
>
> - Show quoted text -
Trying to Hide the problem by using a Format Statement instead of
fixing the code for the Combobox AfterUpdate event is not going to
help. Something in the Option Group's code is not working correctly,
please post it so we can together figure out what needs to be changed.
Q
Pat Hartman - 14 Jan 2008 20:34 GMT
It sounds like Access is making an assumption as to the data type of the
combo control based on the first selection. You may be able to get around
this by changing the RowSource query for the Project. Try the cStr()
function to convert the Project Number to a string.
Select cStr(ProjectNumber) as strProjectNumber From YourTable Order by
ProjectNumber;
> Let me see if I can explain the situation better. I have a form with 2
> ption
[quoted text clipped - 39 lines]
>> > will will be recognized as a text data type.
>> > Thanks