GoTo command

R

Rick

I am a novice at this, however, I have form with a "Reason" field that
contains a Combo Box List. The list contains "Rework" and "Scrap" as the drop
down choices. If Scrap is chosen, I want to set a command to go to the
"Price" field as the very next field to populate. Is there a way to set a
command to go to a certain field based on which response is chosen from a
previous field's drop down list?
 
M

Mushroom

After update event of the combo box.

if me.cboReason.value = "Scrap" Then
me.Price.Set Focus
Else
Me.Somethingelse.set focus
End if

Something like that. I won't swear by it and I just pulled it out of the air.
 
D

Dirk Goldgar

Mushroom said:
After update event of the combo box.

if me.cboReason.value = "Scrap" Then
me.Price.Set Focus
Else
Me.Somethingelse.set focus
End if

Something like that. I won't swear by it and I just pulled it out of
the air.

It's pretty good, but use

.SetFocus

instead of

.Set Focus

That is, the SetFocus method is one word, without a space.
 
M

Mushroom

You know, I thought that didn't look right! It was too close to quittin'
time at work!

Thanks for the correction.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top