hi,

i need to .show a window to enter the date of a record when it was recalled
i have the following so far but its jumping the frmRecallDate.show line.
Any help is appreciated

Private Sub cmdRecall_Click()

On eror GoTo ErrMsg:

With rsRecalls
If .State = 1 Then .Close
.Open "Recalls", CNDoub, adOpenDynamic, adLockOptimistic
.AddNew
!datez = txtdatez.Text
!CONTACT = CboCont.Text
!Mode = Text2.Text
!Namess = Text1.Text
!Agent = Text3.Text
!Ksh = Text4.Text
!Usdollars = Text5.Text

!Confirmationcode = Text6.Text

If Text6.Text = Recall Then
frmRecallDate.Show
End If

.Update
.Close
End With

With rsPayments

.Open mSQL, CNNDouble, adOpenDynamic, adLockOptimistic
!Confirmationcode = Text6.Text

.Update
.Close
End With

MsgBox "Customer's Record Saved Successfully", vbOKOnly + vbInformation, CompanyName

Form_Load
Exit Sub

ErrMsg:
MsgBox Err.Description, vbCritical, CompanyName
Form_Load
End Sub

Recommended Answers

All 4 Replies

can you explain a little bit the following statement

If Text6.Text = Recall Then

is Recall a variable or a constant or a function or something other .

i see that you are coding for adding new records to the table Recalls with using recordset rsRecalls .

At last , As a best practise always close you connection object and set it to Nothing

Explain your problem more clearly so that you can get help on this issue.

If Text6.Text = Recall Then
frmRecallDate.Show
End If
It Skips because this statement is false, Text6.Text = Recall , let us see this Recall ..

but you didn't specify that whats the role of Recall here. Is it a variable or constant or a function or something other.
then we will see the further code and try to solve it

Specify what is Recall.
If recall just string then put double quote around it and confirm the case sensitive input from the textbox.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.