1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Conditional for searching in acces

Discussion in 'Business Applications' started by hatterg, Feb 28, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. hatterg

    hatterg Thread Starter

    Joined:
    Feb 28, 2012
    Messages:
    4
    Greetings, I've been trying to find a way to make what I call "a conditional search" (I don't know if the term is correct).
    I work in a school, where we are building a data base of the students and their courses. The point is that I'd like to have a text box in a form where I can write the Name of the student, and after that access would run a Query searching for matches with that name in the "students" table. IF a registry is found, then show me the data of the student, else open a form where I can enter the new student's data.

    I'm almost sure that this is not as difficult as I'm finding it, so I hope you guys could help me with this.

    Thanks in advance.
     
  2. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    hatterg, what you want to do can be achieved a number of ways.
    The simplest is to have a normal data entry form with a "Find Combo" which will locate the pupil as you type in the name, which you then select to show the record.
    One of the other most useful is to have text bo to enter the name and use VBA to set the Form's "Filter" to dipslay the pupils details.
     
  3. hatterg

    hatterg Thread Starter

    Joined:
    Feb 28, 2012
    Messages:
    4
    OBP, Thanks for the reply. As I said before, I knew there was some easy way to do it and I was missing it!.

    Now, could you help me with some way to show the data of the student? I am guessing this would be a conditional expression?

    Or

    Do you think it would be an easier workaround to use VBA? I have very very little knowledge about VBA, could you help me with this?
     
  4. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    What version of Access are you using?
     
  5. hatterg

    hatterg Thread Starter

    Joined:
    Feb 28, 2012
    Messages:
    4
  6. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    I can't work with Access 2007, only prior versions. Can a copy of the current database be converted to Access 2003 Format?
     
  7. hatterg

    hatterg Thread Starter

    Joined:
    Feb 28, 2012
    Messages:
    4
    Sure, I have both versions installed
     
  8. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    If you can post a zipped copy of the database in Access 2003 I can create you a Search Form. Please ensure it only has dummy data in the tables.
    You use the "Go Advanced" and "Manage Attachments" buttons to add files to your post.
     
  9. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1043064