J
javablood
I am running a make table SQL in VBA and want to be able to format a field to
come out as it appears in the main table. Here is the main part of the code:
SQL = "SELECT [All Invoices].Code, Sum([All Invoices].Amount) AS
SumOfAMOUNT " & _
"INTO [Monthly costs tracking] FROM [All Invoices]" & _
"GROUP BY [All Invoices].Code, [All Invoices].[Month invoice paid], " &
_ . . .etc.
The field "Code" is text but has numbers, e.g., 24.1, 14.2.7, 21.0, etc.
The problem is that the zeros are lost so that 21.0 becomes 21 and it misses
up programs down the line. How do I format this in the code to make sure I
can get the zero to appear in the make table? Not an expert in programming
so please bear with me.
TIA
come out as it appears in the main table. Here is the main part of the code:
SQL = "SELECT [All Invoices].Code, Sum([All Invoices].Amount) AS
SumOfAMOUNT " & _
"INTO [Monthly costs tracking] FROM [All Invoices]" & _
"GROUP BY [All Invoices].Code, [All Invoices].[Month invoice paid], " &
_ . . .etc.
The field "Code" is text but has numbers, e.g., 24.1, 14.2.7, 21.0, etc.
The problem is that the zeros are lost so that 21.0 becomes 21 and it misses
up programs down the line. How do I format this in the code to make sure I
can get the zero to appear in the make table? Not an expert in programming
so please bear with me.
TIA