Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I add characters to a field on Add New Record?

Status
Not open for further replies.

msreed

Programmer
Jul 25, 2003
21
US
I want to populate a field in a table from a field on my form but I want to add to the data, is that posible? For example, the BillNo on my form reads: 2000031039134MAP, I want it to populate with: 2000031039134MAPR. I tried the following but neither one of them worked. Any help would be appreciated.

rstAddNew
rstHeaders![BillNo] = Me![txtBillNo] AND "R"
rstHeaders![BillNo]= " Me![txtBillNo] AND R "

 
try this...

rstHeaders![BillNo] = Me![txtBillNo] & "R"
 
Yes, the record added the R to the BillNo, but with a space in between the two. Is there a way I can get rid of that?
 
i'm not saying the code i gave you is infallible, but did you check to make sure there weren't any blank spaces at the end of the field before the concatenation took place?

try this...

rstHeaders![BillNo] = RTrim(Me![txtBillNo]) & "R"

hope this helps you.
 
The trim function worked, thank you for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top