P
Pamela
I am getting a syntax error on this code. The code is intended to check that
the user entered data into the Remarks field if they also selected the text
that goes with the ID # 2 in cbFOLConsistent. ID (AutoNumber,pk) is the bound
control in my cbo but it displays text. I want the Msgbox to display Yes/No
buttons and on Yes set focus to Remarks so that the user is forced to make
their explanation. In the No case, I want the focus set to
Me.Parent!cbFOLConsistent so that the user can change their selection. I
actually had a lot more text in my msgbox but since I was having trouble,
trimmed it to narrow down my mistake so I understand that the box doesn't
make sense as it is. Here's my code:
If Len(Me.Remarks & vbNullString) And Me.Parent!cbFOLConsistent = "2" Then
If MsgBox("If the Facts of Loss are not consistent with the damage,") =
vbYes Then
Me.Remarks.SetFocus
Else
Me.Parent!cbFOLConsistent.Undo
Response = acDataErrContinue
End If
End If
Thanks for your help!
Pamela
the user entered data into the Remarks field if they also selected the text
that goes with the ID # 2 in cbFOLConsistent. ID (AutoNumber,pk) is the bound
control in my cbo but it displays text. I want the Msgbox to display Yes/No
buttons and on Yes set focus to Remarks so that the user is forced to make
their explanation. In the No case, I want the focus set to
Me.Parent!cbFOLConsistent so that the user can change their selection. I
actually had a lot more text in my msgbox but since I was having trouble,
trimmed it to narrow down my mistake so I understand that the box doesn't
make sense as it is. Here's my code:
If Len(Me.Remarks & vbNullString) And Me.Parent!cbFOLConsistent = "2" Then
If MsgBox("If the Facts of Loss are not consistent with the damage,") =
vbYes Then
Me.Remarks.SetFocus
Else
Me.Parent!cbFOLConsistent.Undo
Response = acDataErrContinue
End If
End If
Thanks for your help!
Pamela