Multiple field entry serpated by ";" (1 Viewer)

AccessVBANewbie

Registered User.
Local time
Today, 19:16
Joined
Jan 23, 2014
Messages
19
Hi
I would like update a table column values separated by “;”
For example
1. ColumA has no data, I want to do an update and place a comma at the end
2. If ColumA has already value do not delete add new valued at the end where “;” if found.

My start attempt as follow:

Code:
[SIZE=3][FONT=Calibri]qry_test= "UPDATE Table1 SET ColumA =’" & "Enter Entered ;" & “’” & _[/FONT][/SIZE]
[SIZE=3][FONT=Calibri]                " WHERE ID=" & 1 [/FONT][/SIZE]
[SIZE=3][FONT=Calibri]Set RS = cnnDB.Execute(qry_test)[/FONT][/SIZE]

What do I need to do to add more stuff where “;” is found without delete existing value if values exist.
Thank you
 

pr2-eugin

Super Moderator
Local time
Today, 19:16
Joined
Nov 30, 2011
Messages
8,494
Not able to understand you completely..
Code:
Dim someTxt As Variant
someTxt = DLookUp("ColumnA", "Table1", "ID = 1")
someTxt = "Enter Entered ;" & IIf(IsNull(someTxt), ",", someTxt)

qry_test= "UPDATE Table1 SET ColumA = '" & someTxt & "' WHERE ID = 1"
Set RS = cnnDB.Execute(qry_test)
 

AccessVBANewbie

Registered User.
Local time
Today, 19:16
Joined
Jan 23, 2014
Messages
19
Thank you very much. It is exactly what I wanted. :)
 

Users who are viewing this thread

Top Bottom