Controls on other form

  • Thread starter Thread starter EMILYTAN via AccessMonster.com
  • Start date 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...
 
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.
 
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...
 
Back
Top