Results 1 to 3 of 3
  1. #1
    Damo10 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    11

    Enter query result in a form textbox

    Hi,



    I have a form that the user enters a machine number in textbox "Machine number" and what I would like to do is after the machine number has been entered populate the textbox "Last" with the result of the query "LastMcCleanQ"

    Can someone explain how to do this please?

    Regards

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    how you accomplish this depends entirely on the design of your form. If the textbox the user is entering the machine number is unbound but the form itself is bound to the query LastMCCleanQ then all you have to do is use an event of the 'machine number' text box (ON EXIT for example) of me.requery

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    You cannot populate a Textbox with result of a Query. If you need to pull a Field from a Query (or Table) that is not in the RecordSource of the Form, the usual method is to use the DLookup Function against that Table or Query, usually pinpointing the exact value using its Criteria Clause, which is similar to the WHERE Clause in SQL.

    Linq ;0)>

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

Similar Threads

  1. Replies: 7
    Last Post: 11-21-2012, 01:41 PM
  2. Replies: 3
    Last Post: 08-03-2012, 02:37 AM
  3. Replies: 3
    Last Post: 06-17-2012, 11:55 AM
  4. Enter result according to drop down list
    By frosty in forum Access
    Replies: 3
    Last Post: 10-12-2011, 07:38 AM
  5. Capture enter key on password textbox
    By sarnata in forum Forms
    Replies: 2
    Last Post: 09-09-2010, 10: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