Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why doesnt a formatted prefix for an AutoNumber ID show in a combo box?

autonumber Box Combo Id prefix
0
Posted

Why doesnt a formatted prefix for an AutoNumber ID show in a combo box?

0

It is important to realise that using a format does not change the data itself, only how it is shown. Access Help states: format: specifies how data is displayed and printed. A format used to add a prefix to an AutoNumber key therefore does not store the prefix with the key value in the data table. The prefix is only added when the value is displayed – but not always, as when the value is the bound field in a combo box. Unless you realise this it can be difficult working out what is going on. An AutoNumber value is numeric, and is entirely under the control of Access, so cannot include any other characters when it is stored – logical when you think about it. When you want to use the value in a query, you must use only the numeric part, not the version with the prefix. This might be one of the reasons why the combo box value does not show the prefix, so that you can use a Forms Collection reference for the value (see point 3 below). The database linked here contains the Chelmer Leisure

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123