By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,192 Members | 1,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,192 IT Pros & Developers. It's quick & easy.

Recording Text Box value to Table

P: 4
I have a data entry form with a text box that is formatted with "=Format(Date(),"yymmdd") & Format([ID])" where ID = AutoNumber field in my table.

I am using the text box value to view/create new sample records as follows 140308001, 140308002... for samples entered on the same day.

Currently my table is only recording the Format(Date(),"yymmdd") portion of the sample ID when I use the following code:

DoCmd.GoToRecord acDataForm, "frmGenerate", acNewRec
Me.VoucherNo.Value = Me.AutoDate.Value

Can I capture multiple format values in a text box on my table?
Mar 8 '14 #1
Share this Question
Share on Google+
1 Reply


100+
P: 104
Expand|Select|Wrap|Line Numbers
  1. =Format(Date(),"yymmdd") & Format([ID])
You're not giving the format function an argument in the second half. Furthermore, you can't concatenate a number to a string. Look into CStr() function.

http://msdn.microsoft.com/en-us/libr...=vs.84%29.aspx
Mar 8 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.