Adding a calculation field?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am new to Access and need assistance creating a field that can pull the
first three text digits of another field. I've tried to do this in the table
and in a query without success. I found the "left" expression in the
expression builder but haven't been able to make it work for me.
For example, the record has a field the says "PTO35712" and I just need the
"PTO" part.
Can anyone help please?

Thanks in advance!
 
Thanks.
Is there a way to add this "Left" calculation to a column in the table?

Jeff Boyce said:
Create a new query. Add the table. Add the field (this is just to "prove"
it's working). Run it.

Add a new field, something like:

NewField: Left([YourFieldName],3)

Run it again.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/


Danni2004 said:
I am new to Access and need assistance creating a field that can pull the
first three text digits of another field. I've tried to do this in the table
and in a query without success. I found the "left" expression in the
expression builder but haven't been able to make it work for me.
For example, the record has a field the says "PTO35712" and I just need the
"PTO" part.
Can anyone help please?

Thanks in advance!
 
No. Tables store data. Queries find it (and do calculations). Forms
display it (and do calculations). Reports display it for printing (and do
calculations).

If you were working with a heavy-duty back-end (data) tool, it might include
a way to do calculations in the tables ... but there are some really good
reasons why having calculated values in tables is not a good idea.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/

Danni2004 said:
Thanks.
Is there a way to add this "Left" calculation to a column in the table?

Jeff Boyce said:
Create a new query. Add the table. Add the field (this is just to "prove"
it's working). Run it.

Add a new field, something like:

NewField: Left([YourFieldName],3)

Run it again.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/


Danni2004 said:
I am new to Access and need assistance creating a field that can pull the
first three text digits of another field. I've tried to do this in the table
and in a query without success. I found the "left" expression in the
expression builder but haven't been able to make it work for me.
For example, the record has a field the says "PTO35712" and I just
need
the
"PTO" part.
Can anyone help please?

Thanks in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top