Access Combo Box

  52MikeH 06:26 30 Jan 2006

I have a sub form which has a combo box "ProductID",When I click on the combo box and select an item I get a message box FIELD CANNOT BE UPDATED.
When I click on ok the message box closes and the field updates anyway !

The productID is an AutoNo,which when the selection is made gives the unit cost of that product,used to calculate the order value.
I have Two tables that use productID,which are linked.
I open a customers form which, from there you open the orders form which has the Order Detail subform form, the ProductId combo box is on this sub form.

Does anyone have any Ideas why this is happening ?


  Chris the Ancien 08:49 30 Jan 2006

Sorry Mike, I can't give a definite answer.

But, there may be a problem with the linking of the two tables. Are the relationships between the tables set to update automatically? In the Relationships display, right click on the link and check that the properties are set correctly.

A *very* good site for Access problems is click here You need to register, but there is no fee and there is no pester -mail from them. They're we;; worth a visit and questions do get picked up on quickly.



  Crunchy 13:49 30 Jan 2006

If you are saying ProductID in your Order detail Subform is an AutoNo that is your problem. The field should be a Number. You should have no problem selecting an AutoNo but you cannot update to an AutoNo. If I am reading you wrong put me right and I will think again.

  52MikeH 18:38 30 Jan 2006

The relationships are Okay and linked correctly.

No the ProductID is a combo box on the form, but it is an auto number in the Table from which the selection is made.
I can select from the combo box on the form and the table does update, but every time I make the selection I get the message box "Field Cannot be updated"
I click ok,and the field is filled and the table when you look is updated.

The database is a rehash of the Wizard Template Order Entry, if this helps.
I just can't see that I have missed enything.


  Crunchy 10:37 31 Jan 2006

Have a look at the After Update of ProductID combobox in the Order Detail Subform. Are you trying to update any other fields as well as the price? If you are, make sure spelling and column number is correct.

The column numbering always starts with zero not 1 which can be confusing when determining the number of the incoming field.

Also make sure you are updating to the same field type ie text to text, number to number.

Good luck

  52MikeH 18:16 01 Feb 2006

Thanks Crunchy,
I have re-done my db to have the combo on the form not the table.
This now works okay.


This thread is now locked and can not be replied to.

Elsewhere on IDG sites

iMac Pro review

See iconic duo Smith and Foulkes' epic animation for the BBC's Winter Olympics coverage

iMac Pro review

Idées cadeaux pour geeks et tech addicts