Another really simple (but easily forgotten) scenario:
Opening a form with a control button on another form. That I have no problem with. However, I wish to change the attributes of the controld of the field(s) on that form. Here is the code:
Private Sub Button_Click()
On Error GoTo Err_Button_Click
Dim stDocName As String
stDocName = "FormName"
DoCmd.OpenForm stDocName, acNormal, acEdit
Form.FIELDNAME1.Enabled = True
Form.FIELDNAME1.ForeColor = 1232564
(or whatever)
Exit_Button_Click:
Exit Sub
Err_Button_Click:
MsgBox Err.Description
Resume Exit_Button_Click
End Sub
Could anyone please tell me what I'm obviously missing? Thanks in advance,
S.
Opening a form with a control button on another form. That I have no problem with. However, I wish to change the attributes of the controld of the field(s) on that form. Here is the code:
Private Sub Button_Click()
On Error GoTo Err_Button_Click
Dim stDocName As String
stDocName = "FormName"
DoCmd.OpenForm stDocName, acNormal, acEdit
Form.FIELDNAME1.Enabled = True
Form.FIELDNAME1.ForeColor = 1232564
(or whatever)
Exit_Button_Click:
Exit Sub
Err_Button_Click:
MsgBox Err.Description
Resume Exit_Button_Click
End Sub
Could anyone please tell me what I'm obviously missing? Thanks in advance,
S.