handlebarry
Technical User
hi - I'm using the following code to fill a field when creating new records.
Dim db As Database
Dim tdf As TableDef
Set db = CurrentDb
Set tdf = db.TableDefs("tblContractsToProperties")
tdf.Fields("ContractCode").DefaultValue = Forms!frmContractAmend.ContractCode
However a contract code looks like this 03/002. Which is giving me 1.5!! in the record.
The field a text field, tried changing ot to a memo but the same happens, tried fixed as the format but nothing. I can't change the format of the code. Anyone got any ideas?
Dim db As Database
Dim tdf As TableDef
Set db = CurrentDb
Set tdf = db.TableDefs("tblContractsToProperties")
tdf.Fields("ContractCode").DefaultValue = Forms!frmContractAmend.ContractCode
However a contract code looks like this 03/002. Which is giving me 1.5!! in the record.
The field a text field, tried changing ot to a memo but the same happens, tried fixed as the format but nothing. I can't change the format of the code. Anyone got any ideas?