?
Solved

"How format 4 digit number in a combined text field?"

Posted on 2013-05-31
2
Medium Priority
?
551 Views
Last Modified: 2013-05-31
I have this code which isn't working quite right.

    Me.txtTempTransN = Me.cboTransferral
    Me.txtTransN = Me.txtTempTransN & "-" & Me.txtSeqN

What is happening is the 2nd line of code is working ok except for the last part of it.

Me.TempTransN is formatted so a number like 0001 is actually showing up as "0001" because someone helped me format the field in the table as 0000.

But now the combined field (Me.txtTransN) is showing the last part as just a "1" instead of "0001" (after the "-")

How can I make it "0001" ?
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 39211628
Me.txtTransN = Me.txtTempTransN & "-" & Format(Me.txtSeqN,"0000")
0
 

Author Comment

by:SteveL13
ID: 39211635
Perfect.  Thanks again!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question