Hildegoat15
Technical User
I've got a problem that's got me stumped. I work for a respiratory services company and I'm creating a Transfer History table that records if clients transfer to another region (RHA). The destination table has the user's client id (text), old RHA (integer), new RHA (integer) and Transfer Date (date). The insert into statement works 95% well, but if i add a client with id# 00001, that field in the Transfer History table just shows 1. if the client id is a text field, why would it take off the leading zeroes? my code looks like this:
CurrentDb.Execute "INSERT INTO Transfer(ClientID, OldRHA, NewRHA, TransferDate) VALUES (" & Me!txtClientID & ", " & Me!txtOldRHA & ", " & Me!txtNewRHA & ", #" & Me!txtTransferDate & "#);", dbFailOnError
Any suggestions would be greatly appreciated. -Matt
CurrentDb.Execute "INSERT INTO Transfer(ClientID, OldRHA, NewRHA, TransferDate) VALUES (" & Me!txtClientID & ", " & Me!txtOldRHA & ", " & Me!txtNewRHA & ", #" & Me!txtTransferDate & "#);", dbFailOnError
Any suggestions would be greatly appreciated. -Matt