textbox - combobox

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have a form that has a button on it that will copy the information
from one revision to another. Things are working fine with the
exception of if the going to revision is not listed in the combobox
then a message is to alert the user the copying to revision does not
exist. The ElseIf line I was hoping would do a check is the
following;

Dim sql As String

If "" & IsNull(Me.txtCopySpecToRevision) Then
MsgBox "You need to provide the revision that you are copying
to.", vbCritical, "Need Revision"
Me.txtCopySpecToRevision.SetFocus

ElseIf Me.txtCopySpecToRevision.Value <> Forms![Parts]!
cboViewRevision Then
MsgBox "That revision is not on the list.", vbOKOnly, "Wrong
Revision"

Else
sql = "RISpecAndToleranceUpdateFromPreviousRevision '" &
txtCopySpecPartNumber & "', '" & txtCopySpecToRevision & "', " &
gUserID & " "
Call RunSQLServerStoredProcedure(sql)
DoCmd.Close acForm, "xCopySpecsToDifferentRev"

End If


This still throws the message the revision does not exist even if it
does. Am I missing something?

Thanks...John
 
John said:
ElseIf Me.txtCopySpecToRevision.Value <> Forms![Parts]!
cboViewRevision Then
MsgBox "That revision is not on the list.", vbOKOnly, "Wrong
Revision"

Is Parts an open form?
 
John said:
   ElseIf Me.txtCopySpecToRevision.Value <> Forms![Parts]!
cboViewRevision Then
       MsgBox "That revision is not on the list.", vbOKOnly, "Wrong
Revision"

Is Parts an open form?

Yes. Parts is the main form that has the info on it. The form with
copy button is a popup form that shows the partnumber and the userid.
And the going to revision is placed by the user in the revision
textbox.
 
Back
Top