Autofill text box based on three combobox selections

johho0ha

Registered User.
Local time
Today, 06:05
Joined
Apr 9, 2007
Messages
10
I have a list of pathology staging into three categories, based on these three comboboxes of each category, you can determine what stage the three choices mean.

There are comboboxes for a T stage, N stage and a M Stage. The T stage has 4 choices (T1, T2, T3, and T4), N stage has 4 choices (N0, N1, N2, N3) and the M stage has two choices (M0, M1).

Different combinations of the T stage, N stage and M stage make up a specific stage (IA, IB, IIA, IIB, IIIA, IIIB, IV). What would be the general code of the text box that needs to be autofilled with the these three pre-picked comboboxes? Please note, some of the stages of more than one option for combinations of the comboboxes and other combinations that allow any choice for T, but specific for N and M.

Hope this question make sense. Thank you
 
Because you didn't give more details,
I have improvised. Look at "DemoAutofilA2002.mdb"
Adapt it as you need.
 

Attachments

I see your code and I tried to apply it to my case selections (there are a lot). When I tried to run the code I get an error stating

"The expression After Update you entered as the event property setting produced the following error: Procedure declaration does not match description of event or procedure having the same name.

*The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].

*There may have been an error evaluating the function, event, or macro."

my code that i used is attached.

Sorry...I guess I didn't explain the complications into full details :(
 

Attachments

Send a short example of your MDB.
I can't say anything on grounds yor code only.
 
is my mdb my database? if so, i have attached the form and hopefully you can see what my form is doing wrong
 

Attachments

Just an FYI for you -

If you are getting all of these:
"The expression After Update you entered as the event property setting produced the following error: Procedure declaration does not match description of event or procedure having the same name.

*The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].

*There may have been an error evaluating the function, event, or macro."
then it is likely that you tried to create your own events by either typing or pasting and not letting Access create them by your selecting them. Access doesn't like it when we try to take the reins and create our own events (even more so when they are the same name as existing events).
 
Hello calitij!

I think it's OK now. I changed the name (Name properties) on the field
"Pathologic stage grouping". I put "LIMIT TO LIST" properties to YES on the
fields "Pathologic_T, ..._N,..._M". I put some change in VBA.
I entered 2 records.
Look at attachment.
 

Attachments

Users who are viewing this thread

Back
Top Bottom