Wierd Result in Access Calculation

chegra26

Board Regular
Joined
Jun 7, 2014
Messages
90
I have a field named InvoiceNo which is a combination of 3 other fields. These fields are ActivityABB, Date, and BusNo
The purpose of the field is to create a customized invoice number based on the activity the date and the bus number. I am using the following calculation, which should result in a combination of the three fields. However, when I change the bus number, the field sums this with the existing bus number instead of just changing the bus number.
Any suggestions?
InvoiceNo: [ActivityABB] & [Date] & "-" & [BusNo]

Thank you
:confused:
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi,
What are the data types of the fields?
Can you provide a little sample data to show an example?
 
Upvote 0
The fields are all populated from other tables as a look up.
ActivityABB is text
Date is a medium date field
BusNo is short text in the main table named Busses, However the BusNo field changes to a number when I use it for a lookup, which I am assuming why the invoice number doesn't populate correct.
The Invoice number should look like FL03082016-51. FL is the Activity ABB, 03082016 is the date, I added the "-" and 51 is the bus number. However if I change the bus number, the invoice number changes and the last number is not the bus number itself. It seems like it calculates the previous number with whatever I am changing it to. Don't know if this makes sense.
 
Upvote 0
If everything is based on lookups then you probably need to look at your lookups as a potential source of the problem. Is this "combined" field actually in a table? Are the lookups actually in a table? I would suggest you don't do either - no combined fields in tables and no lookups in tables. You can keep the data in separate fields and just use the three fields as your primary key (if that's what you need). Save the concatenation for forms and reports (as needed).
 
Upvote 0

Forum statistics

Threads
1,221,826
Messages
6,162,192
Members
451,752
Latest member
majbizzaki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top