Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228

    Text box to display names.

    Similar to my other post about combo boxes, basically I want a text box which is on a form linked to a table, to display a name using a foreign key as a reference.



    I just had it semi working with D lookup and the whole database corrupted.

    I'm aware the question here is lacking detail, but If there is any additional information you need please ask.

    eg. site_ID would be changed to Site_name on JobsF using JobsT as the record source

    the site_ID is dependent on Job_ID

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    why a text box , when a combo box will have all the options to fill?

    where did this form get called from? is it connected to a query?
    is it the starting point with all records, or a blank record?
    is it a detail form called from another form filled with detail data on 1 record?

    yes, your problem lacks detail.

  3. #3
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    Using a DLookUp() behind the textbox corrupted your database? Strange.

    What is you end goal for this form? Why does this need to be displayed in the textbox?

  4. #4
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    inner joins in the form record source was the answer. I wanted it in a text box because I didn't want the user to be able to change it. Its more like a Label for the name of the site.

    I cant say for sure what corrupted the database but that is what I was doing at the time.. I put in wrong values in a D lookup and the database corrupted. It recovered everything apart from this form.

    the form is using a table (jobsT) as the record source as said in the original post.

    and yes its a form to display a variety of information about 1 record (one job). It shows its location, who attended, how long, notes, client engineers... all sorts.

    I was working at this all day and to be honest I was annoyed so apologies for the lack of detail. I'm glad its sorted now though.

    Andy.

  5. #5
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    It is working well now?

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Andy,

    Please describe to readers WHAT you are trying to accomplish in plain English.
    You have told us HOW you have done something, which isn't working.
    What is the significance of the textbox?

    Is this a desktop application?
    If you are selecting data for presentation, where did the update of the database occur?
    If you are getting codes instead of names are you using Lookups at the table field level?

    Describe the opportunity/issue in plain English.
    Show us the table layouts.
    Show us some sample records.
    Show us a mock up of the result you are trying to achieve.

  7. #7
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    My first line is saying what I want to accomplish mate.

    Code:
    I want a text box which is on a form linked to a table, to display a name using a foreign key as a reference
    That is what I want in its entirety. No specific details are needed as its a question about using text boxes in general. The answer applies on every setup, It would be no good for you guys to give me the answer here if I have to ask it again in a few weeks time.

    I have a form, on it is a text box, the form is linked to table_A, the text box needs to display a name from table_B.

    I resolved the issue by using the form wizard on a new form then copying the record source it created. So I know now where the problem is/was.

  8. #8
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    My problem is solved now, but do you understand me now orange?

    @ nick. its working.... well? we will see

  9. #9
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    If you would like to see my relationships or anything else im happy to show you, but its not needed. my relationships are all fine.

    relationships is the only part I'm confident with to be honest.

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

Similar Threads

  1. Replies: 2
    Last Post: 05-13-2015, 03:20 PM
  2. Replies: 6
    Last Post: 03-05-2015, 01:42 PM
  3. Display Names horizontal instead of vertical
    By bradleyg in forum Reports
    Replies: 2
    Last Post: 10-03-2014, 12:39 PM
  4. Write Multiple file names to a text box
    By PoolHallJunkie in forum Programming
    Replies: 4
    Last Post: 09-16-2014, 01:16 PM
  5. Replies: 9
    Last Post: 04-18-2014, 08:51 PM

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