Ask Your Question

Base - List box not formated as original field in associated table

asked 2018-03-18 16:04:47 +0100

clendee gravatar image

updated 2018-03-18 16:16:13 +0100

Hi folks,

Im trying to create a small database for my brothers electrical business.

I have a list box that I inserted on a form. This list box is linked to a small VAT table. In the VAT table, is a Vat_ID and a Vat_Rate. The Vat_Rate field is set to numeric and formatted as a %.

However in the list box I cannot get it to appear as a percentage, ie 23% in the Vat table appears as 0.23 in the list box. Can this be formatted to appears as 23% in the list box?

Also, how do I set a default value in the list box for this field as there is a default value for the Vat_Rate field set in the table?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-03-18 18:08:11 +0100

Ratslinger gravatar image


I get mixed and inconsistent results when it comes to the displayed value in a list or combo box. You can get a consistent display by changing the SQL for what is displayed:

image description

image description

Two fields are created in the SQL. The displayed field first and the actual field second. The Bound field is the field actually stored within the record (field numbers relative to '0').

Default values are another story. A default value in the table is deceiving. See How to change the default value of field in base? which discusses dates but actually related to all field defaults in a table ( see bug reported at end of my answer).

If you use a Valuelist in the listbox, one of the items in the list can be set as the default.

If you use SQL, you would need to use a macro to set which item was the default. In this case, if the table changes (such as the item was deleted) you may also need to change the macro.

edit flag offensive delete link more


Thank you for your response. That works well with the % sign. Im afraid Im new to macros so will have to look into that further.

clendee gravatar imageclendee ( 2018-03-18 20:11:16 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-03-18 16:04:47 +0100

Seen: 69 times

Last updated: Mar 18 '18