Messagebox in macro if applyfilter is null (1 Viewer)

BJF

Registered User.
Local time
Today, 15:59
Joined
Feb 19, 2010
Messages
133
Hi,

I have little experience using the macros in access.
Would someone be able to direct me on how to make my macro work!

below i attached a screenshot of what ive got so far, and the filter is working fine, only i cant get the messagebox to work. i named the applyfilter 'FindRecord' but that doesnt seem to reference it in my IF statement.

thanks for any advice
BJF
 

Attachments

  • applyfilter macro with msgbox.png
    applyfilter macro with msgbox.png
    8.6 KB · Views: 139

sneuberg

AWF VIP
Local time
Today, 12:59
Joined
Oct 17, 2014
Messages
3,506
If you were using VBA you could do something like:


Code:
Me.Filter = "[Customer] Like  "*" Forms![frmCustomerQuotes]![Text76] & "**
Me.FilterOn = True
If Me.RecordsetClone.RecordCount = 0 Then
    MsgBox "Filter returns no records"
    Me.FilterOn = False
End If


There's probably some way to do that in a macro but I don't know how and as your post has been just sitting for hours without attention I'd guess some of the other forum member don't know either.

I suggest you switch to VBA. You could start learning VBA with this video series.
 

Users who are viewing this thread

Top Bottom