J
justagrunt
Hi,
I tried an UPDATE query on an existing table to populate a new field with
the following;
"Tag"= [DevicetagID] & "-" & Format([TagID1],"0000") & Format([TagID],"00")
but the result was nothing.
The existing table has 3000 entries.
The fields in question that have data that is relevent are;
DeviceTagID = Text
TagID1 = number
TagID = number
The new field
Tag = Text
How can this new filed be updated with the data from the other three?
When this field is populated it becomes unique and will assist in a one to
many relationship.
I tried to write a macro but got lost;
Dim SQL As String
DoCmd.SetWarnings False
SQL = "UPDATE [ProjectEntity]" & _
"SET [Tag] = [DevicetagID] & "-" & Format([TagID1],"0000") &
Format([TagID],"00")'"
"WHERE ??????????
DoCmd.RunSQL SQL
I tried an UPDATE query on an existing table to populate a new field with
the following;
"Tag"= [DevicetagID] & "-" & Format([TagID1],"0000") & Format([TagID],"00")
but the result was nothing.
The existing table has 3000 entries.
The fields in question that have data that is relevent are;
DeviceTagID = Text
TagID1 = number
TagID = number
The new field
Tag = Text
How can this new filed be updated with the data from the other three?
When this field is populated it becomes unique and will assist in a one to
many relationship.
I tried to write a macro but got lost;
Dim SQL As String
DoCmd.SetWarnings False
SQL = "UPDATE [ProjectEntity]" & _
"SET [Tag] = [DevicetagID] & "-" & Format([TagID1],"0000") &
Format([TagID],"00")'"
"WHERE ??????????
DoCmd.RunSQL SQL