A very difficult form....for me!

back2basic

Registered User.
Local time
Today, 05:24
Joined
Feb 19, 2013
Messages
113
For three days I have been trying to create a specific form and all the things I know simply do not work..........Please help

I have a table of records (Table A) which has two tables or PK's from foreign tables embedded in it (Table B & Table C). I want to create a form which details the records of Table A in a specific way. Call it form A

Question:

1) In from A, which shows the records of table A, I would like to insert a ComboBox which lists selected fields of table A. All I have been able to accomplish with the CB is just showing the PK of table A in the ComboBox.

More specifically, of the foreign tables embedded in in Table A, I do not want to show the PK's in the ComboBox, However something more meaningful like the name or description.

I hope this makes sense:banghead:
 
One of the choices in a combo row source type is "Field List". Maybe this is what you want.
 
For three days I have been trying to create a specific form and all the things I know simply do not work..........Please help

I have a table of records (Table A) which has two tables or PK's from foreign tables embedded in it (Table B & Table C). I want to create a form which details the records of Table A in a specific way. Call it form A

Question:

1) In from A, which shows the records of table A, I would like to insert a ComboBox which lists selected fields of table A. All I have been able to accomplish with the CB is just showing the PK of table A in the ComboBox.

More specifically, of the foreign tables embedded in in Table A, I do not want to show the PK's in the ComboBox, However something more meaningful like the name or description.

I hope this makes sense:banghead:

I believe that the Form may just be doing what it is supposed to do. You have provided little information, but I believe that your situation is similar to the one below.

If when you open tblPurchaseOrder, instead of an index ID, you see the actual values from the othger Table, it is because a Table Lookup is in place. Since tblPurchaseOrder only contains the index (FK) for the entries in the two other Tables, that is all that can be displayed on the Form if you only look at tblPurchaseOrder. You can get around this by basing your Form on a Query that links the three Tables, and selects the proper information from the proper Tables.

Code:
tblPurchaseOrder
    OrderPK
    ModelFK
    ClientFK
    ... Other PurchaseOrder related Data ...
 
tblModelInfo
    ModelPK  
    ModelName  
    ... Other Model related Data ...
 
tblClient
    ClientPK
    ClientName
    ... Other Client related Data ...
 
Thank you, are you speaking about the CB Row Source using the Query/Builder? I don't see "field list" anywhere else in the properties.
 
I believe that the Form may just be doing what it is supposed to do. You have provided little information, but I believe that your situation is similar to the one below.

If when you open tblPurchaseOrder, instead of an index ID, you see the actual values from the othger Table, it is because a Table Lookup is in place. (Can't remember, how do I change the table lookup) Since tblPurchaseOrder only contains the index (FK) for the entries in the two other Tables, that is all that can be displayed on the Form if you only look at tblPurchaseOrder. You can get around this by basing your Form on a Query that links the three Tables, and selects the proper information from the proper Tables.

It is very similar, thank you. I have tried to create a query using the row source Query Builder of the comboBox but still all I see is the PK of the table. I agree its doing what I tell it to do and my ignorance is not helping.


Code:
tblPurchaseOrder
    OrderPK
    ModelFK
    ClientFK
    ... Other PurchaseOrder related Data ...
 
tblModelInfo
    ModelPK  
    ModelName  
    ... Other Model related Data ...
 
tblClient
    ClientPK
    ClientName
    ... Other Client related Data ...
------------------------------------------------
 
------------------------------------------------

In the Query Builder, you will need to select all three Tables and Join the appropriate FKs to the PKs in the Table that they are associated with. In the Field Selection, select all Fields except the FKs from tblPurchaseOrder, and the related Data from each of the other two Tables.
 
Thank you, are you speaking about the CB Row Source using the Query/Builder? I don't see "field list" anywhere else in the properties.

Access 2007.

Combo Properties
RowSourceType: Field List
RowSource: sometablename
 
Maybe I don't understand your question. Perhaps you are looking for "cascaded combos"?
 
In the Query Builder, you will need to select all three Tables and Join the appropriate FKs to the PKs in the Table that they are associated with. In the Field Selection, select all Fields except the FKs from tblPurchaseOrder, and the related Data from each of the other two Tables.

Awesome, thank you now we are getting somewhere. This works but some problems?

Row source updated automatically great! However, column count (for some reason by default was blank) I set it to 6 and all columns showed up, Great. Problem is columns are toooo thin. I changed the widths to 1" and all the columns excepts the PK disappeared again?
 
Awesome, thank you now we are getting somewhere. This works but some problems?

Row source updated automatically great! However, column count (for some reason by default was blank) I set it to 6 and all columns showed up, Great. Problem is columns are toooo thin. I changed the widths to 1" and all the columns excepts the PK disappeared again?

MS Rookie, Thank you. This CB is display all the data I need and limping along. I simply changed the Width to 5". All the fields are shown.

When I try to select a record I get am error
"The value you entered isn't valid for this field". I am not trying to enter data in this form, I simply want to see the fields arranged as needed and then prompt the user for questions using a VBA sub.
 
The columns widths can be set individually by entering the values between semicolons.

Use zero for columns you don't want to display.
 

Users who are viewing this thread

Back
Top Bottom