Help with filling a field and expressions

  • Thread starter Thread starter Kelcod
  • Start date Start date
K

Kelcod

Guest
I am new to MS-Access.

I want to fill a field on record creation that will concatenate my OfficeID field (text) with this autonumber.

ON123
QC124
QC125 and so on.

I created a field in my table and now I want to use the other two fields to fill it with the above. I tried using the SetValue in the Macros but I cannot get the expression right.

Can anyone help?

Thanks.
 
Since it sounds like something you could always create when you need it, it's not the kind of thing you should save in your table. In forms and reports, put them together with:

=OfficeIDField & AutoNumberField

which should present the data the way you want to see it.
 
pbaldy said:
Since it sounds like something you could always create when you need it, it's not the kind of thing you should save in your table. In forms and reports, put them together with:

=OfficeIDField & AutoNumberField

which should present the data the way you want to see it.

Take a look here and also search the forum for 'concatenate' there are many useful threads.
 
Thanks but....

pbaldy said:
Since it sounds like something you could always create when you need it, it's not the kind of thing you should save in your table. In forms and reports, put them together with:

=OfficeIDField & AutoNumberField

which should present the data the way you want to see it.

That won't work for me. I actually want it stored in a table. I am going to use it as a primary key. Two different people using the database at different locations that are not networked.

I will take the data from one table (location 1) and append it to the other (location 2) every once and awhile. The autonumber will not work as a primary in this case because 2 different locations are running the same databases independently.

Thanks.
 
I've got a similar problem.

I use an autonumber internally and want to continue doing that, but I also want an alternative number with a letter prefix, and I want to store it.

I've tried various ways of adding a prefix to the autonumber field, but I can't seem to do it, normally the autonumber doesn't yet exist when I try to create mine.
 
duh dingbat!

One of the problems was that I had a field name, and a text box with the same name as the field but it was bound to a different field. And by defualt access used the control name not the field name.
 

Users who are viewing this thread

Back
Top Bottom