macro to change data type

  • Thread starter Thread starter Jennifer
  • Start date Start date
J

Jennifer

My users wanted a simple method of recording employee data
so I created a form consisting primarily of checkboxes.
What I need to do is take the fields where there are
checks and convert their type--yes/no is fine for a start,
but would eventually be converted into meaningful text
(they haven't decided yet on a code or date).

Right now I've got a macro set up to run a make-table
query with the checkbox data. I can't figure out how to
add macro steps to change the data types in the new table
from Yes/No to Text. The macro then continues to plug data
into various locations. I realize this is not the most
efficient way to store the data, but it makes them happy
so I've gotta do it.
 
No, I want the *macro* to change data types. The users
won't have a clue what's going on. Because this is all
happening in a table made by the macro, I'm not risking
losing any data.

I've done this manually with no problem, but it needs to
be automated so that the process is completed quickly.
 
I don't think you need to change data type for a field. Instead, use an
append query to put the data into the table; for the "value" of the field
that you want to "change", use a function such as Switch or Choose or IIf to
exchange the "yes/no" value with your desired value.
 
Back
Top