Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Searching an Access 2003 Database Using Data Access Pages

Discussion in 'Information Technology' started by Spent, Jul 28, 2006.

  1. Spent

    Spent
    Expand Collapse
    Guest

    Hey all, I'm working on a database for my company which holds project
    information in one table, this is the only table I need to search, and
    I want to basically run a query on it using the text boxes on my data
    access page. That is - I want the user to type into the various
    feilds, [all optional]. Anything that they do not enter will count as
    wildcard, and everything they do will be used to search for a match in
    that feild. I thought this would be a quite simple process,
    considering a query of this type to me seemed quite common, however I
    seem to be stumped. The closest I have found is something for adding a
    find button on the microsoft help pages, however by its explanation it
    only allows the user to search one feild - the primary key. Any
    guidance would be apreciated,

    -Zach
     
  2. Loading...

    Similar Threads Forum Date
    World War 1 Sikh-Canadian Pioneers: Still Searching for Our Sikh War Heroes History of Sikhism Feb 20, 2011
    Sikh News US to begin searching Sikh turbans (Bangkok Post) Breaking News Sep 3, 2007
    Sikh News Sikh community condemns policy on searching turbans (Oakland Tribune) Breaking News Aug 29, 2007
    Searching for an answer Spiritual Articles Mar 22, 2006
    Soul-searching Doctors Find Life After Death Interfaith Dialogues Nov 15, 2004

  3. KARL DEWEY

    KARL DEWEY
    Expand Collapse
    Guest

    For criteria use this if they are to enter exact values --
    Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    [Forms]![YourForm]![YourTextBox])

    For criteria use this if they are to enter start of the value --
    Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    [Forms]![YourForm]![YourTextBox]) & "*"

    For criteria use this if they are to enter any part of the value --
    Like "*" & IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    [Forms]![YourForm]![YourTextBox]) & "*"


    "Spent" wrote:

    > Hey all, I'm working on a database for my company which holds project
    > information in one table, this is the only table I need to search, and
    > I want to basically run a query on it using the text boxes on my data
    > access page. That is - I want the user to type into the various
    > feilds, [all optional]. Anything that they do not enter will count as
    > wildcard, and everything they do will be used to search for a match in
    > that feild. I thought this would be a quite simple process,
    > considering a query of this type to me seemed quite common, however I
    > seem to be stumped. The closest I have found is something for adding a
    > find button on the microsoft help pages, however by its explanation it
    > only allows the user to search one feild - the primary key. Any
    > guidance would be apreciated,
    >
    > -Zach
    >
    >
     
  4. Spent

    Spent
    Expand Collapse
    Guest

    This seems to be what I need, specifically the first one, however I
    don't know where to put this code, is this a vbscript? Sorry to ask
    for such basic instructions, this is my first access project ever and I
    am kind of lost. I am used to working with Iseries and stuff and
    working directly with SQL is much different from this program.

    KARL DEWEY wrote:
    > For criteria use this if they are to enter exact values --
    > Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > [Forms]![YourForm]![YourTextBox])
    >
    > For criteria use this if they are to enter start of the value --
    > Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > [Forms]![YourForm]![YourTextBox]) & "*"
    >
    > For criteria use this if they are to enter any part of the value --
    > Like "*" & IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > [Forms]![YourForm]![YourTextBox]) & "*"
    >
    >
    > "Spent" wrote:
    >
    > > Hey all, I'm working on a database for my company which holds project
    > > information in one table, this is the only table I need to search, and
    > > I want to basically run a query on it using the text boxes on my data
    > > access page. That is - I want the user to type into the various
    > > feilds, [all optional]. Anything that they do not enter will count as
    > > wildcard, and everything they do will be used to search for a match in
    > > that feild. I thought this would be a quite simple process,
    > > considering a query of this type to me seemed quite common, however I
    > > seem to be stumped. The closest I have found is something for adding a
    > > find button on the microsoft help pages, however by its explanation it
    > > only allows the user to search one feild - the primary key. Any
    > > guidance would be apreciated,
    > >
    > > -Zach
    > >
    > >
     
  5. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    What Karl's given you would be typed into the Criteria cell of the query
    underneath the specific table field in question.

    Note that there was word-wrap in the post. All 3 of Karl's suggestions are
    each 1 line long.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Spent" <zach@look.ca> wrote in message
    news:1151588969.659822.150830@j72g2000cwa.googlegroups.com...
    > This seems to be what I need, specifically the first one, however I
    > don't know where to put this code, is this a vbscript? Sorry to ask
    > for such basic instructions, this is my first access project ever and I
    > am kind of lost. I am used to working with Iseries and stuff and
    > working directly with SQL is much different from this program.
    >
    > KARL DEWEY wrote:
    > > For criteria use this if they are to enter exact values --
    > > Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > [Forms]![YourForm]![YourTextBox])
    > >
    > > For criteria use this if they are to enter start of the value --
    > > Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > [Forms]![YourForm]![YourTextBox]) & "*"
    > >
    > > For criteria use this if they are to enter any part of the value --
    > > Like "*" & IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > [Forms]![YourForm]![YourTextBox]) & "*"
    > >
    > >
    > > "Spent" wrote:
    > >
    > > > Hey all, I'm working on a database for my company which holds project
    > > > information in one table, this is the only table I need to search, and
    > > > I want to basically run a query on it using the text boxes on my data
    > > > access page. That is - I want the user to type into the various
    > > > feilds, [all optional]. Anything that they do not enter will count as
    > > > wildcard, and everything they do will be used to search for a match in
    > > > that feild. I thought this would be a quite simple process,
    > > > considering a query of this type to me seemed quite common, however I
    > > > seem to be stumped. The closest I have found is something for adding

    a
    > > > find button on the microsoft help pages, however by its explanation it
    > > > only allows the user to search one feild - the primary key. Any
    > > > guidance would be apreciated,
    > > >
    > > > -Zach
    > > >
    > > >

    >
     
  6. Spent

    Spent
    Expand Collapse
    Guest

    Thank you, thank you, thank you! Will this information work with a
    data access page instead of a form too? As in,

    Like IIF([Forms]![Input]![proj_morguard_num] Is Null, "*",
    [Forms]![Input]![proj_morguard_num])

    Worst case scenario I can revert to forms but I think pages would be
    easier. It is my understanding that pages are just web based forms, in
    which case I think this should work. Also, is "YourTextBox" value the
    ID of my textbox? Because right now the ID of all my text boxes is the
    same as the feild it relates to! I don't want to cause a problem due
    to this. Thank you all for your patientience and help in the matter,
    you've made my learning experience much less grueling.

    -Zach

    Douglas J Steele wrote:
    > What Karl's given you would be typed into the Criteria cell of the query
    > underneath the specific table field in question.
    >
    > Note that there was word-wrap in the post. All 3 of Karl's suggestions are
    > each 1 line long.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Spent" <zach@look.ca> wrote in message
    > news:1151588969.659822.150830@j72g2000cwa.googlegroups.com...
    > > This seems to be what I need, specifically the first one, however I
    > > don't know where to put this code, is this a vbscript? Sorry to ask
    > > for such basic instructions, this is my first access project ever and I
    > > am kind of lost. I am used to working with Iseries and stuff and
    > > working directly with SQL is much different from this program.
    > >
    > > KARL DEWEY wrote:
    > > > For criteria use this if they are to enter exact values --
    > > > Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > > [Forms]![YourForm]![YourTextBox])
    > > >
    > > > For criteria use this if they are to enter start of the value --
    > > > Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > > [Forms]![YourForm]![YourTextBox]) & "*"
    > > >
    > > > For criteria use this if they are to enter any part of the value --
    > > > Like "*" & IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > > [Forms]![YourForm]![YourTextBox]) & "*"
    > > >
    > > >
    > > > "Spent" wrote:
    > > >
    > > > > Hey all, I'm working on a database for my company which holds project
    > > > > information in one table, this is the only table I need to search, and
    > > > > I want to basically run a query on it using the text boxes on my data
    > > > > access page. That is - I want the user to type into the various
    > > > > feilds, [all optional]. Anything that they do not enter will count as
    > > > > wildcard, and everything they do will be used to search for a match in
    > > > > that feild. I thought this would be a quite simple process,
    > > > > considering a query of this type to me seemed quite common, however I
    > > > > seem to be stumped. The closest I have found is something for adding

    > a
    > > > > find button on the microsoft help pages, however by its explanation it
    > > > > only allows the user to search one feild - the primary key. Any
    > > > > guidance would be apreciated,
    > > > >
    > > > > -Zach
    > > > >
    > > > >

    > >
     
  7. Spent

    Spent
    Expand Collapse
    Guest

    Thank you, thank you, thank you! Will this information work with a
    data access page instead of a form too? As in,

    Like IIF([Forms]![Input]![proj_morguard_num] Is Null, "*",
    [Forms]![Input]![proj_morguard_num])

    Worst case scenario I can revert to forms but I think pages would be
    easier. It is my understanding that pages are just web based forms, in
    which case I think this should work. Also, is "YourTextBox" value the
    ID of my textbox? Because right now the ID of all my text boxes is the
    same as the feild it relates to! I don't want to cause a problem due
    to this. Thank you all for your patientience and help in the matter,
    you've made my learning experience much less grueling.

    -Zach

    Douglas J Steele wrote:
    > What Karl's given you would be typed into the Criteria cell of the query
    > underneath the specific table field in question.
    >
    > Note that there was word-wrap in the post. All 3 of Karl's suggestions are
    > each 1 line long.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Spent" <zach@look.ca> wrote in message
    > news:1151588969.659822.150830@j72g2000cwa.googlegroups.com...
    > > This seems to be what I need, specifically the first one, however I
    > > don't know where to put this code, is this a vbscript? Sorry to ask
    > > for such basic instructions, this is my first access project ever and I
    > > am kind of lost. I am used to working with Iseries and stuff and
    > > working directly with SQL is much different from this program.
    > >
    > > KARL DEWEY wrote:
    > > > For criteria use this if they are to enter exact values --
    > > > Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > > [Forms]![YourForm]![YourTextBox])
    > > >
    > > > For criteria use this if they are to enter start of the value --
    > > > Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > > [Forms]![YourForm]![YourTextBox]) & "*"
    > > >
    > > > For criteria use this if they are to enter any part of the value --
    > > > Like "*" & IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > > [Forms]![YourForm]![YourTextBox]) & "*"
    > > >
    > > >
    > > > "Spent" wrote:
    > > >
    > > > > Hey all, I'm working on a database for my company which holds project
    > > > > information in one table, this is the only table I need to search, and
    > > > > I want to basically run a query on it using the text boxes on my data
    > > > > access page. That is - I want the user to type into the various
    > > > > feilds, [all optional]. Anything that they do not enter will count as
    > > > > wildcard, and everything they do will be used to search for a match in
    > > > > that feild. I thought this would be a quite simple process,
    > > > > considering a query of this type to me seemed quite common, however I
    > > > > seem to be stumped. The closest I have found is something for adding

    > a
    > > > > find button on the microsoft help pages, however by its explanation it
    > > > > only allows the user to search one feild - the primary key. Any
    > > > > guidance would be apreciated,
    > > > >
    > > > > -Zach
    > > > >
    > > > >

    > >
     
  8. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    To be honest, I haven't worked with data access pages. If they use ADO, you
    might have to replace the * with % in that statement.

    Not sure what you mean by "the ID of my textbox". Do you mean the name of
    the text box is the same as the name of the field to which it's bound? That
    shouldn't be an issue.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Spent" <zach@look.ca> wrote in message
    news:1151590836.227886.120390@i40g2000cwc.googlegroups.com...
    > Thank you, thank you, thank you! Will this information work with a
    > data access page instead of a form too? As in,
    >
    > Like IIF([Forms]![Input]![proj_morguard_num] Is Null, "*",
    > [Forms]![Input]![proj_morguard_num])
    >
    > Worst case scenario I can revert to forms but I think pages would be
    > easier. It is my understanding that pages are just web based forms, in
    > which case I think this should work. Also, is "YourTextBox" value the
    > ID of my textbox? Because right now the ID of all my text boxes is the
    > same as the feild it relates to! I don't want to cause a problem due
    > to this. Thank you all for your patientience and help in the matter,
    > you've made my learning experience much less grueling.
    >
    > -Zach
    >
    > Douglas J Steele wrote:
    > > What Karl's given you would be typed into the Criteria cell of the query
    > > underneath the specific table field in question.
    > >
    > > Note that there was word-wrap in the post. All 3 of Karl's suggestions

    are
    > > each 1 line long.
    > >
    > > --
    > > Doug Steele, Microsoft Access MVP
    > > http://I.Am/DougSteele
    > > (no e-mails, please!)
    > >
    > >
    > > "Spent" <zach@look.ca> wrote in message
    > > news:1151588969.659822.150830@j72g2000cwa.googlegroups.com...
    > > > This seems to be what I need, specifically the first one, however I
    > > > don't know where to put this code, is this a vbscript? Sorry to ask
    > > > for such basic instructions, this is my first access project ever and

    I
    > > > am kind of lost. I am used to working with Iseries and stuff and
    > > > working directly with SQL is much different from this program.
    > > >
    > > > KARL DEWEY wrote:
    > > > > For criteria use this if they are to enter exact values --
    > > > > Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > > > [Forms]![YourForm]![YourTextBox])
    > > > >
    > > > > For criteria use this if they are to enter start of the value --
    > > > > Like IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > > > [Forms]![YourForm]![YourTextBox]) & "*"
    > > > >
    > > > > For criteria use this if they are to enter any part of the value --
    > > > > Like "*" & IIF([Forms]![YourForm]![YourTextBox] Is Null, "*",
    > > > > [Forms]![YourForm]![YourTextBox]) & "*"
    > > > >
    > > > >
    > > > > "Spent" wrote:
    > > > >
    > > > > > Hey all, I'm working on a database for my company which holds

    project
    > > > > > information in one table, this is the only table I need to search,

    and
    > > > > > I want to basically run a query on it using the text boxes on my

    data
    > > > > > access page. That is - I want the user to type into the various
    > > > > > feilds, [all optional]. Anything that they do not enter will

    count as
    > > > > > wildcard, and everything they do will be used to search for a

    match in
    > > > > > that feild. I thought this would be a quite simple process,
    > > > > > considering a query of this type to me seemed quite common,

    however I
    > > > > > seem to be stumped. The closest I have found is something for

    adding
    > > a
    > > > > > find button on the microsoft help pages, however by its

    explanation it
    > > > > > only allows the user to search one feild - the primary key. Any
    > > > > > guidance would be apreciated,
    > > > > >
    > > > > > -Zach
    > > > > >
    > > > > >
    > > >

    >
     

Share This Page