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.
|
|
0
|
|
|
|
Reply
|
Utf
|
4/26/2010 12:16:01 AM |
|
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.
|
|
0
|
|
|
|
Reply
|
John
|
4/26/2010 1:18:41 PM
|
|
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" <Messen@discussions.microsoft.com> wrote in message
news:CC3354BB-D8B0-47C3-BB23-B4AD0EB82034@microsoft.com...
>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.
|
|
0
|
|
|
|
Reply
|
Jeff
|
4/26/2010 4:35:32 PM
|
|
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.
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
4/27/2010 11:13:01 PM
|
|
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.
>> .
>>
|
|
0
|
|
|
|
Reply
|
John
|
5/5/2010 11:53:37 AM
|
|
|
4 Replies
621 Views
(page loaded in 0.002 seconds)
Similiar Articles: How to find a record using more than one field? - microsoft.public ...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 form... a field of a record has more than one record in access table ...How to find a record using more than one field? - microsoft.public ... a field of a record has more than one record in access table ... How ... for find records ... How to records that the date field = todays date in VBA ...How to find a record using more than one field? - microsoft.public ... I have created a table with several fields such as ID, name, date, etc. I also created a switchboard ... Find a record based on field on other form using primary key ...How to find a record using more than one field? - microsoft.public ... Find a record based on field on other form using primary key ..... up with my own 'Heath Robinson ... LINQ: Select records but enforce one field to be unique ...How to find a record using more than one field? - microsoft.public ... LINQ: Select records but enforce one field to be unique ... silly question - how to use properties ... Find Recordset field number using field value - microsoft.public ...... good resources to learn more ... of the Fields in a ADO Record - microsoft ... Find Recordset field number using ... You can only search on one field ... cannot use OR or AND. Using a combo box to determine which field to search. - microsoft ...I have a form and wish to find records using a combo box ... If you want to use a combo box for search, you have ... FIGURE 8.10: Use the wizard to add more than one field to ... Previous Value + 1 in a field - microsoft.public.access.forms ...... to the value of the same field in the previous record, plus one ... time it'll start adding 1 to the newly entered number or you close the form. -- There's ALWAYS more than ... 1 combo box populating more than one field and retaining info to t ...1 combo box populating more than one field and ... Combo Box to select a record and populate fields in a form ... 1 combo box populating more than one field and ... Need query to find for matches of one field within another field ...Need query to find for matches of one field within another field ... Query to list records that don't match ... Find Unmatched Query to compare by more than one field 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 How to find a record using more than one field? - microsoft.public ...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 form... 8/1/2012 5:09:44 PM
|