S
scubadiver
I need help with a couple of things:
First Query:
I have two unbound text boxes on a main form that I want to use to search
two bound text boxes.
The unbound text boxes are [Cname] and [address] and the equivalent text
boxes I want to search are [CustomerName] and [Address1]
I have been given the following code and I am getting a bug with ".address":
Private Sub CustSrch_Click()
Dim rstClone As Recordset
Set rstClone = Me.RecordsetClone
rstClone.FindFirst "[CustomerName] = '" & Me.Cname & "' And [Address1] =
'" & Me.Address & "'"
If rstClone.NoMatch Then
MsgBox "No Matching Customer Found"
Else
Me.Bookmark = rstClone.Bookmark
End If
Set rstClone = Nothing
End Sub
Also, when a record is found I want the unbound text boxes to be empty.
Second query:
Not everyone customer has an email address so there are times when the
text box is empty.
I have a button which opens up Outlook Express. How do I disable the button
if there is no email address. I have given it a go but it doesn't work.
First Query:
I have two unbound text boxes on a main form that I want to use to search
two bound text boxes.
The unbound text boxes are [Cname] and [address] and the equivalent text
boxes I want to search are [CustomerName] and [Address1]
I have been given the following code and I am getting a bug with ".address":
Private Sub CustSrch_Click()
Dim rstClone As Recordset
Set rstClone = Me.RecordsetClone
rstClone.FindFirst "[CustomerName] = '" & Me.Cname & "' And [Address1] =
'" & Me.Address & "'"
If rstClone.NoMatch Then
MsgBox "No Matching Customer Found"
Else
Me.Bookmark = rstClone.Bookmark
End If
Set rstClone = Nothing
End Sub
Also, when a record is found I want the unbound text boxes to be empty.
Second query:
Not everyone customer has an email address so there are times when the
text box is empty.
I have a button which opens up Outlook Express. How do I disable the button
if there is no email address. I have given it a go but it doesn't work.