If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to find a record using more than one field?
I have created a table with several fields such as ID, name, date, etc. I
also created a switchboard with a find command to locate a record in forms view . However the find command only searches under one field. Can I create a find command that matches 2 fields? I want my find command to find a record in form view that matches both the ID and date fields. |
#2
|
|||
|
|||
How to find a record using more than one field?
Yes, it is possible. There are several methods that should work.
Can you post what method you used to for your find command? Then if you used VBA code we can suggest a modification to the code. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Messen wrote: I have created a table with several fields such as ID, name, date, etc. I also created a switchboard with a find command to locate a record in forms view . However the find command only searches under one field. Can I create a find command that matches 2 fields? I want my find command to find a record in form view that matches both the ID and date fields. |
#3
|
|||
|
|||
How to find a record using more than one field?
It may only be a matter of semantics, but when you have a field named "ID",
the implication is that this is a unique row identifier. As such, you would NOT need to do a find by both ID and "date fields", since the ID would already be unique. .... but maybe this isn't how you are using the field name... Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Messen" wrote in message ... I have created a table with several fields such as ID, name, date, etc. I also created a switchboard with a find command to locate a record in forms view . However the find command only searches under one field. Can I create a find command that matches 2 fields? I want my find command to find a record in form view that matches both the ID and date fields. |
#4
|
|||
|
|||
How to find a record using more than one field?
I created a find record macro with three commands. (Real basic stuff here)
I used three commands. "OpenForm", then "GoToControl", then "RunCommand". I then used a command button on the switchboard form to run the macro. The problem here is, I have no VBA training. If VBA is required I would need to know the whole code and how to link it to the comand button I quess. I may be asking for more than my skill level is able to perform. "John Spencer" wrote: Yes, it is possible. There are several methods that should work. Can you post what method you used to for your find command? Then if you used VBA code we can suggest a modification to the code. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Messen wrote: I have created a table with several fields such as ID, name, date, etc. I also created a switchboard with a find command to locate a record in forms view . However the find command only searches under one field. Can I create a find command that matches 2 fields? I want my find command to find a record in form view that matches both the ID and date fields. . |
#5
|
|||
|
|||
How to find a record using more than one field?
Sorry for the lack of response. I was out of town for a week.
You cannot use your method to search two fields simultaneously on two different values. This will require VBA and a form to input the two values you want to search for. Do you want to limit the results to display to just the records that match your criteria (filter the records)? John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Messen wrote: I created a find record macro with three commands. (Real basic stuff here) I used three commands. "OpenForm", then "GoToControl", then "RunCommand". I then used a command button on the switchboard form to run the macro. The problem here is, I have no VBA training. If VBA is required I would need to know the whole code and how to link it to the comand button I quess. I may be asking for more than my skill level is able to perform. "John Spencer" wrote: Messen wrote: I have created a table with several fields such as ID, name, date, etc. I also created a switchboard with a find command to locate a record in forms view . However the find command only searches under one field. Can I create a find command that matches 2 fields? I want my find command to find a record in form view that matches both the ID and date fields. . |
Thread Tools | |
Display Modes | |
|
|