Solved

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

Posted on 2013-05-31
2
541 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
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

929 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now