populate liatbox based on selected record

hollarindy

Registered User.
Local time
Today, 09:36
Joined
Nov 16, 2012
Messages
33
I'm using a sub form to display data form a table. The users wanted it display like a spread sheet. In order to get all the data to display on the same page I am trying to break some of the longer feilds out (i.e. comment field) and display them in a list/text box and not in the table with the smaller fields.

Basically what will happen is when a record is selected in the sub form the comment field tied to each record will be displayed below. I've tried a few things but I keep getting errors displayed in my list/text box (#Name?)
 
#Name? means Access does not recognize the listbox or textbox source. How are you referencing the control source?
 
What mean list/text box ?
The control is either a list box either a text box.
But I think that the best way to try to help you is to ask you to upload the database.
I use Access 2007
 
#Name? means Access does not recognize the listbox or textbox source. How are you referencing the control source?

I am referencing it via the properties list under data and control source.
 
What mean list/text box ?
The control is either a list box either a text box.
But I think that the best way to try to help you is to ask you to upload the database.
I use Access 2007

I mean I am using either a list or a text box. I have been playing with both and can't get either one to do what I want.
 
I am referencing it via the properties list under data and control source.
What exactly is your syntax? Is it bound to a field in a table or are you trying to use an expression?
 
My control Source is =[tblLateral]![Procedure]
My Row Source is SELECT [qryLateral_by Label].[Procedure] FROM [qryLateral_by Label];

I have tried several combinations of the two and nothing seems to work.
 
If this control is intended to be bound to a field in the underlying forms record source than you directly refer to the field

Control Source: Procedure

If the control is unbound then leave the control source blank.
 
If this control is intended to be bound to a field in the underlying forms record source than you directly refer to the field

Control Source: Procedure

If the control is unbound then leave the control source blank.


You'll have to forgive me I'm not sure I understand. I've been having some memory issues lately so you may need to use crayons to explain it to me.
 
Bound means you intend to update a field in the table record, Unbound means you are only using the control to display information or use for filtering etc. If you would like to attach your DB I can take a look for you.
 
Bound means you intend to update a field in the table record, Unbound means you are only using the control to display information or use for filtering etc. If you would like to attach your DB I can take a look for you.

It should be bound.

It's kind of a mess because I usually clean up my databases when I'm done. I configured it to open to the form I'm having issues with. Everything I'm working on with this form is from tblLateral. When the form opens it will prompt you twice for a label #. Another issue I'm working it should only prompt once. If you leave it blank and hit ok it pulls everything. You will see a almost identical replica of tblLateral minus a few fields and a box below labeled procedure. I want procedure to update everytime you select a new line in the table above. Thanks again for taking time to look at this.
 

Attachments

Here is an update. I set it up to have both the Procedure and Label as comboboxes for filtering your subform.

I finally got a chance to see what you sent me. Thats not exactly what I had in mind but thats gets me a step closer to where I want to be. Thank you.
 
Billmeye

Ok, so I'm kind of back to the same problem I had before. I could get the form to display the information I wanted. I was using a query that required user input and you are using a drop down box. Thats all well and good. The problem I have is there isn't enough space to disply all of the data in the table. I have hidden fields in that table that I need to display. I was thinking I could us a list box, it would need to be tied to the individual record select. There is an auto number field in the original table.

I attached a screen shot of what I am trying to do. I've tried setting up the list boxes before but when I use the wizard the fields I need to display aren't there.
 

Attachments

To better understand your goal, is this form intended for creating and editing records? Splitting fields between different forms is really not a good idea, it will create record locking errors as you attempt to edit data for the same record in multiple locations. The need to have a datasheet appears to be a limiting factor for you. Do you know that you switch between Datasheet View and Form View? I've added a button to your form to allow this, maybe this option will suit your needs.
 

Attachments

To better understand your goal, is this form intended for creating and editing records? Splitting fields between different forms is really not a good idea, it will create record locking errors as you attempt to edit data for the same record in multiple locations. The need to have a datasheet appears to be a limiting factor for you. Do you know that you switch between Datasheet View and Form View? I've added a button to your form to allow this, maybe this option will suit your needs.

I have to admit thats not exactly what I had in mind, but I think it might work. I'll have to see if the users can find anything to complain about. My original intent was to have one form to input records (you might have seen it) and this form was intended to search for and view records edit them if needed.

I thik the only thing I will change is the default view for the masses. I don;t know why... I can read and edit code but I can't figure out from scratch...


Thanks again
 
It's difficult to accomplish a datasheet with extra fields located outside of the datasheet. Yes, it could be done for just viewing the data, you can use Dlookup() based on whichever record currently is selected in the datasheet, but you can't have every record's extra fields showing at the same time, very confusing. Datasheet view is good for small tables, numbers, dates etc. with short fields. For very large tables I tend to like to split them up using the tab control with some type of organization so the user can understand what they will find behind each tab. Good luck.
 

Users who are viewing this thread

Back
Top Bottom