Format unbound Text Box

  • Thread starter Loggical via AccessMonster.com
  • Start date
L

Loggical via AccessMonster.com

I have an unbound Text Box in the form header that receives its information
from two text boxes in the details section of the form.
txtDepartmentIdEmployeeNumber = [txtDepartmentId] & " " &
[txtEmployeeNumber]

When txtDepartmentIdEmployeeNumber displays the text its displays GM 1. What
I am trying to display is GM000001 (A 6 digit number)

Form = frmEmployees
txtDepartmentId (Type Text)
txtEmployeeNumber (Formatted as 000000) (Type Number)
Unbound Text Box = txtDepartmentIdEmployeeNumber

Any help with this would be much appreciated.
 
A

AccessVandal via AccessMonster.com

Use the format function

txtDepartmentIdEmployeeNumber = [txtDepartmentId] & Format([txtEmployeeNumber]
,000000)
I have an unbound Text Box in the form header that receives its information
from two text boxes in the details section of the form.
txtDepartmentIdEmployeeNumber = [txtDepartmentId] & " " &
[txtEmployeeNumber]

When txtDepartmentIdEmployeeNumber displays the text its displays GM 1. What
I am trying to display is GM000001 (A 6 digit number)

Form = frmEmployees
txtDepartmentId (Type Text)
txtEmployeeNumber (Formatted as 000000) (Type Number)
Unbound Text Box = txtDepartmentIdEmployeeNumber

Any help with this would be much appreciated.
 
L

Loggical via AccessMonster.com

AccessVandal said:
Use the format function

txtDepartmentIdEmployeeNumber = [txtDepartmentId] & Format([txtEmployeeNumber]
,000000)
I have an unbound Text Box in the form header that receives its information
from two text boxes in the details section of the form.
[quoted text clipped - 10 lines]
Any help with this would be much appreciated.

I tried what you did and it didn't work. Kept on reverting back
txtDepartmentIdEmployeeNumber = [txtDepartmentId] & Format([txtEmployeeNumber]
I treid the following which did work.txtDepartmentIdEmployeeNumber =
[txtDepartmentId] & Format([txtEmployeeNumber]
,"000000")
I knew it had to be a simple answer.

Thanks for your help.
 
A

AccessVandal via AccessMonster.com

Nice to hear, I forgot about putting the quotes there.
Use the format function
[quoted text clipped - 6 lines]
I tried what you did and it didn't work. Kept on reverting back
txtDepartmentIdEmployeeNumber = [txtDepartmentId] & Format([txtEmployeeNumber]
I treid the following which did work.txtDepartmentIdEmployeeNumber =
[txtDepartmentId] & Format([txtEmployeeNumber]
,"000000")
I knew it had to be a simple answer.

Thanks for your help.
 

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

Top