Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    djspod is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2015
    Posts
    164
    ProducingSiteID_PK Supplying Site SiteSAPNumber
    31 Bolton W1
    32 Bristol W18
    33 Burnley W3
    34 Eastwood W8
    35 Enfield W14
    39 Newburn W6
    46 Stockton W16
    49 Tuscany W15
    50 Variety W12
    51 Wednesbury W13
    52 Gluten Free W19


  2. #17
    djspod is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2015
    Posts
    164
    =DLookUp("[Supplying_Site]"," tblAllSites "," tblAllSites .SiteSAPNumber = " & Chr(34) & [text2] & Chr(34))

  3. #18
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Is there an extra space after tableallsites. And before sitesapp etc?


    Sent from my iPhone using Tapatalk

  4. #19
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Oops no it's the delimiters for a string.
    Should be

    Sitesappnumber = '" & [text2] & "'")


    Sent from my iPhone using Tapatalk

  5. #20
    djspod is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2015
    Posts
    164
    No, Does not seem so?

    =DLookUp("[Supplying_Site]","tblAllSites","tblAllSites.SiteSAPNumber = " & Chr(34) & [text2] & Chr(34))

  6. #21
    djspod is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2015
    Posts
    164
    Oh I see, just popped out.
    Really appreciate your help with this problem.

    Just a quick question:

    As a learning point for myself in vba when I get something like this again.

    What's your methodology of breaking the issue down And working out the best code, Module, function to sort the problem out?

    Or will this come in time?

    Thanks

    Darren



    Sent from my SM-G935F using Tapatalk

  7. #22
    djspod is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2015
    Posts
    164
    I'll retry the ammendment Dlookup when I get back

    Sent from my SM-G935F using Tapatalk

  8. #23
    djspod is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2015
    Posts
    164
    Hi Andy,

    Reworked the Dlookup but is still not working for some reason?

    I have added a copy of the DB if that helps?

    =DLookUp("[SupplyingSite]"," tblAllSites ","tblAllSites.SiteSAPNumber ='" & [text2] & "'")



    Thanks

    Darren
    Attached Files Attached Files

  9. #24
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    TEST CC1.zip

    I think the button is the best way round this.

    I keep hitting errors via other routes

  10. #25
    djspod is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2015
    Posts
    164
    That works fine Andy, Many thanks!

    To help myself I have your working out for my own understanding.
    Great piece of work mate.

    I guess each problem has a similar approach.

    My understanding now needs to develop further so I can achieve the same methodical path on solving a similar DB problem.

    Thanks for taking the time to help.

    Darren


    Sent from my SM-G935F using Tapatalk

  11. #26
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Np don't forget to mark it as solved


    Sent from my iPhone using Tapatalk

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Form Textbox based on a Query Criteria
    By Peace in forum Queries
    Replies: 4
    Last Post: 05-07-2014, 01:05 PM
  2. Query criteria based on Form TextBox value
    By stildawn in forum Queries
    Replies: 8
    Last Post: 11-10-2013, 04:53 PM
  3. Replies: 10
    Last Post: 10-14-2013, 10:18 AM
  4. Replies: 2
    Last Post: 03-30-2012, 08:26 AM
  5. Updating record based on textbox entry
    By timmy in forum Programming
    Replies: 16
    Last Post: 04-06-2011, 12:05 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