A(nother) humble combo box question (1 Viewer)

Hutas

New member
Local time
Today, 22:29
Joined
Dec 7, 2017
Messages
4
Dear all,

Please find attached my zip,
There is two little things that I can't figure out.

pls check 'frmAssignments' --> combo box: 'Object Type'.

1. when clicked, the combo box shows 3 columns. Column 3 shows the prime key, but I would like it rather to show the associated 'text' of the PriceCategory tbl --> what am I doing wrong (and what is different from column 1&2 which work fine) ?

2. After a selection, the combo box gives an error, ("the value you entered is not valid for this field...")

Any tips would be highly appreciated.
I'm still learning bits and pieces every day.
Kind regards,
Vernon
 

Attachments

  • aaTEST4.zip
    34.4 KB · Views: 43

plog

Banishment Pending
Local time
Today, 15:29
Joined
May 11, 2011
Messages
11,646
1st and foremost, your relationships are incorrect. There should only be one way to travel from one table to another in your Relationship Tool. Your tables are in a loop. I can get from tblAssignments to tblCustomers by travelling clockwise or counter clockwise. That is incorrect. You really need to focus on this before moving to forms. And after that you should set up reports--no point in building an amazing user interface if you are just throwing your data into a pit from which you can't get out the data you need.

Now, for your issue, you are using the wrong bound column in your drop down. Your drop down uses these columns in this order: Description, Price, Category. The Bound Column is 1, meaning Description is what the form is trying to put into your tblAssignments when you add/edit a record. Unfortunately the Object field in tblAssignments is a number and Description is text, so round peg, square hole--not going to fit. The bound column of your drop down must correspond to a number field, specifically, it should be the ID field of tblObjects.

Again though, fix your tables and forget forms for a bit.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:29
Joined
May 7, 2009
Messages
19,242
on its property set the Bound Column to 3, primary key. to show thw assoc price, you hide the column 3 by setting column count to 3 and column widths to 1;1;0.
 

Users who are viewing this thread

Top Bottom