Consulting

Results 1 to 5 of 5

Thread: Solved: Simple question; (DoCmd.FindRecord)

  1. #1

    Solved: Simple question; (DoCmd.FindRecord)

    Hello all, to get straight to the point, I have a database with a 'Customer Details' Table. Baring in mind that the field Customer ID is (the primary key) issued for each customer, I need to know some VBA code that will allow me to enter a customer ID and find the related records for that customer.

    I have tried using a form with a text1.txt but my visual basic skills aren't great. I'd love it if anyone could help!

    Basically what I've got in mind is either a form/prompt that will allow me to enter a customer ID, and then this customers details are found. I need it in VBA.

    cheers for anything you can suggest
    Last edited by NFFC_Evans; 04-19-2007 at 04:04 PM.

  2. #2
    VBAX Regular
    Joined
    Jan 2007
    Posts
    20
    Location
    Have a look at this article from the MS Knowledge Base...

    304428 (http://support.microsoft.com/kb/304428/) How to use the query by form (QBF) technique

    hth,
    Giacomo

  3. #3
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,297
    Location
    A very simple alternative is to use a Combo Box.
    Another alternative if you are using a "Search Form" is to just set a query's Criteria Row to the Search Form's CustomerID.
    You don't need any VBA for the first method and very little (run the query) for the second.

  4. #4
    Thank you for the responses, the reason I wanted to have a more complex/more code based idea is because this is for coursework and the more technical the better, but thank you again for the replies.

  5. #5
    The QBF solution worked a dream btw

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •