Results 1 to 7 of 7
  1. #1
    WayneSteenkamp is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    107

    Possible expression equation needed?

    Hey guys,



    I'm trying to create a database for someone and there's a task I'm not sure how to do.
    Basically I want to enter a number in a text box on a form and as I do this, I want it to look up a field in a specific table and if it see's the same number typed in. It brings up Unit its assigned to.

    E.g
    If the Simcard number typed in is the Same as Simcardnumber in a table/field then bring up the Phone/unit it's attached/assigned to esle display "unassigned" message.

    Hope that makes sense
    I'm thinking this is an Expression Equation that is needed?

    regards,

    Wayne

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    You want to view the entire record if one exists? Check out tutorials at http://datapigtechnologies.com/AccessMain.htm especially the Build a Custom Filter in Your Form under Access Forms: Tips & Techniques section.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    WayneSteenkamp is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    107
    It's not exactly what I had in mind but that method is a possiblity.

    Yes, I want it to search a record automatically as i type, preferably not by a dropdown menu

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Solution depends on behavior you want. Do you want to open the record or just tell user if the value was or was not found? What will user do after the search is done?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    WayneSteenkamp is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    107
    basically searches what the user types in, if found - brings up the device its attached to. If not - says "Unassigned"

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    By 'brings up the device' do you mean open a record or just tell user what the device is? What will user then do after they get this information?

    The following can just tell user result of search. In the VBA AfterUpdate event of textbox, code:

    MsgBox Nz(DLookup("fieldname", "tablename", "fieldname='" & Me.textboxname & "'"), "Unassigned")

    This example assumes the field being searched is a text datatype. If it is number don't use the apostrophe delimiters (date type uses # delimiter). Use your field and table names in place of the generic aliases.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    WayneSteenkamp is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    107
    That sounds better. Another dumb question. How do I find the place to insert the text? :/ Sorry

    Nevermind. Found it

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Making an equation
    By joce in forum Access
    Replies: 1
    Last Post: 10-27-2011, 09:56 AM
  2. A new equation problem
    By stryder09 in forum Access
    Replies: 2
    Last Post: 03-23-2011, 02:28 PM
  3. still having equation problem
    By stryder09 in forum Access
    Replies: 16
    Last Post: 02-19-2011, 12:13 AM
  4. Another equation almost done now
    By stryder09 in forum Access
    Replies: 4
    Last Post: 02-18-2011, 12:18 PM
  5. Another equation question
    By stryder09 in forum Access
    Replies: 3
    Last Post: 02-17-2011, 11:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums