+ Reply to Thread
Results 1 to 9 of 9

help with dlookup

  1. #1
    Forum Contributor
    Join Date
    12-03-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    184

    help with dlookup

    Hello Everyone,

    Can someone show me how to insert data from a query into a text boxes on a form in access. I've been trying dlookup but can't seem to get it to work or understand what I'm supposed to do with it. I'm attaching a sample database. I'm trying to find a location in my query list that matches the location name of a text box then insert the data that is to the right of the location query field. So, location E1-B1 should have data 11-22 then place 11-22 in the text box named E1-B1 and so on. Any help or clues would be much appreciated

    thx

    E.
    Last edited by enhydra; 06-09-2011 at 09:48 PM.

  2. #2
    Forum Contributor
    Join Date
    12-03-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: help with dlookup

    Oops, I guess I can't upload a database.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: help with dlookup

    You should be able to upload your database. Check the size limitation. BE sure to run a compact and repair to make it minimum size. Click on the advanced button on your first thread and scroll down to manage attachments.

    Some questions:

    Is your form bound to a table?

    Is your form bound to your query?

    Are the text boxes you are trying to populate in the body of the form or in the footer or header?

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor
    Join Date
    12-03-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: help with dlookup

    Had to zip it before it would except.
    Attached Files Attached Files

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: help with dlookup

    I don't know of any way to put multiple records from a table/query onto a single form. This can be done if you change your form to continuous view or datasheet view. If you choose either of those two suggestions, then you would only need two fields (controls) on your form and bind your form to your query. Perhaps there is someone else out in this forum with a better idea.

    Alan

    Edit: You could possibly present the data you want in an Access Report using the Query as your record source.
    Last edited by alansidman; 06-07-2011 at 02:00 PM.

  6. #6
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: help with dlookup

    Here is a way to fill those textboxes:

    Please Login or Register  to view this content.
    If you put an entry in the table that has no corresponding textbox, you will get an error.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  7. #7
    Forum Contributor
    Join Date
    12-03-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: help with dlookup

    Thank you Dave. That's work well. I don't think it will matter with the "no corresponding textbox" because there will always be more boxes then entries. I add an extra row of boxes and no errors. Looks good to me. This is my first attempt at moving my excel project to access.


    mucho appreciated.

    E.

  8. #8
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: help with dlookup

    You're not using those text boxes to mimic cells are you? Use a datasheet in the form instead (as alansidman said). Access is different than Excel - it stores and manipulates data more efficiently, but the calculations that a user may want to make need to be set up beforehand, usually with programming.

  9. #9
    Forum Contributor
    Join Date
    12-03-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: help with dlookup

    No, they are being used just as you see them, a text box, to display text right from a table.

    E.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1