Controls on other form

  • Thread starter EMILYTAN via AccessMonster.com
  • Start date
E

EMILYTAN via AccessMonster.com

I am trying to code on when a button is being click from other form, a combo
box text from other form will check to "Close" where the job= 11111

is this the right way to code?

Dim str1 As String
Dim str2 As String

str1 = Forms![WIPRaw]!txtJob.Text

str2 = Me.txtJobOld

If str2 = str1 Then
Forms![WIPRaw]!combo1.Text = "Close"

End If

Simply can't get it works...
 
D

Douglas J. Steele

Remove the .Text at the end.

The control must have focus in order to refer to the Text property. Since
your code is in another form, it's not possible for the control to have
focus.
 
E

EMILYTAN via AccessMonster.com

Still can't get the combo box to display "Close"...and there is no any error
appear...
Douglas said:
Remove the .Text at the end.

The control must have focus in order to refer to the Text property. Since
your code is in another form, it's not possible for the control to have
focus.
I am trying to code on when a button is being click from other form, a
combo
[quoted text clipped - 15 lines]
Simply can't get it works...
 

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