Finding a record through a form

antonellac

Registered User.
Local time
Today, 07:15
Joined
Aug 15, 2004
Messages
15
I am creating a program using MS Access. I am using a find button as shown below.

Can you please illustrate how to do an error message in case no record is found.

As you can see in the attachment, right now I am being taken on the first record when no results are found.

Regards,
A. Cordina
University of Malta
 

Attachments

  • find.JPG
    find.JPG
    48 KB · Views: 153
Why Dont you use the button instead of a macro in form. the button wizard has a buildup Find Record . use that and add the rest of the code in it
 
The problem with the command button is that the command button function only works whilst using the FIND only in the particular form and not as I wish to do. See attached attachement
 

Attachments

  • find2.jpg
    find2.jpg
    32.9 KB · Views: 141
If you used combo boxes to select from you wouldn't be able to search for invalid dates/order numbers
 
I use macros

No, I didn't use combo boxes but macros. Please guide me accordingly.
 
Macros are not the way to go. I would recommend you following Rich tip and use an unbound combo box rather than a macro.

Moreover, you can also create a Find Command Button by using the wizard.
 
Search Problem

Max, [

The combo box solution is in appropriate as the fields are expected to contain huge amounts of data to include everything in the combo boxes.

Nella


 
That's not a large amount. The limit for a single combo is appr. 64,000
 
Thanks

I discovered that there is a method which you didn't tell me about. DLookup. I will see too it.
 

Users who are viewing this thread

Back
Top Bottom