How to show white space in arrays if data does not exist Ms access VBA Collection
Dear All;
I need some help to construct a better VBA filter in Ms Access on the Arrays, I remember one helped me here, but unfortunately, I have misplaced the code. The objectives of the code are listed below:
(1) If no data found in the record source, then both the object and value pair should disappear in the Json string (The string should show white space or blank ONLY) I do NOT want it to return either (null or “”) never.
(2) If data is found in the record source, then both the object and value pair found should show in the Json string , example (
Current Code:
Required amendments:
The problem here is that the me.remove doesn’t work! That is where I have a problem.
Your help will be appreciated.
I need some help to construct a better VBA filter in Ms Access on the Arrays, I remember one helped me here, but unfortunately, I have misplaced the code. The objectives of the code are listed below:
(1) If no data found in the record source, then both the object and value pair should disappear in the Json string (The string should show white space or blank ONLY) I do NOT want it to return either (null or “”) never.
(2) If data is found in the record source, then both the object and value pair found should show in the Json string , example (
“States in Africa”,53
)Current Code:
dict.Add fld.Name, rs.fields(fld.Name).value
Required amendments:
dict.Add fld.Name, iif(rs.fields(fld.Name).Value = Null,Me.remove, rs.fields(fld.Name).Value)
The problem here is that the me.remove doesn’t work! That is where I have a problem.
Your help will be appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.