Question Help with data from another table on a form.

extremeshannon

Registered User.
Local time
Yesterday, 21:07
Joined
Aug 28, 2019
Messages
24
Hello all,
The next thing I am running into is probably simple and I just have not figured it out yet. I have normalized my data base and have separate tables. I have created Foriegn Key fields and have a relationship between them. I am trying to create a form that will update with the other tables to a master table.

tblAsset
AssetID
Name
SiteID (FK)

tblSite
SiteID (PK)
SiteName

I create a Form
frmAsset

cboSite row source tbleSite > Sitename

this combo box shows me the names of the sites and I can select one. I get an Error "The Value you entered isn't valid for this field." I understand it is trying to put characters into a field that is data type numbers.


How can I create this relationship between the tables and have a Combo box show me the names not the primary key and update the master table (asset in this case)

I hope I have explained what I am doing and what I want to happen well enough. Please point me to any references and I will be happy to read how to do this correctly. I was using Lookup Fields in my Database until I was informed and sent a link about them. I have removed them all and I am trying to do it correctly now.

Thanks in advance everyone has been extremely patient and helpful on this site.

Shannon
 
Typically you'd have a combo with 2 fields, the ID field and the text field. The ID field would be hidden but be the bound field, the text would display for the user. The combo wizard should walk you through it.
 
Typically you'd have a combo with 2 fields, the ID field and the text field. The ID field would be hidden but be the bound field, the text would display for the user. The combo wizard should walk you through it.
Hi Shannon. LOL. I said basically the same thing, as Paul just said here, in your other thread. I guess we could continue the discussion here.
 
Thanks everyone for the reply. Looks lie I got it figured out. I think I was not using 2 fields. I did not realize if the ID field was hidden it would Work.

Thanks
Shannon
 
Thanks everyone for the reply. Looks lie I got it figured out. I think I was not using 2 fields. I did not realize if the ID field was hidden it would Work.

Thanks
Shannon
Hi Shannon. The trick is the "Bound Column" property. It identifies the value of the Combo regardless if the column is visible or not. Cheers!
 
Hi Shannon. The trick is the "Bound Column" property. It identifies the value of the Combo regardless if the column is visible or not. Cheers!

This helps a lot. This was the bane of my forms.

Thanks
 

Users who are viewing this thread

Back
Top Bottom