Error Message/Control Needed

R

Randy

I have a macro that sorts through records. I need this macro to continue through the required records if there is information missing...Basically the macros looks to a field and if the information is not in the field the macro stops and I have to manually fix the problem and rerun the macro. I need the macro to check if the information is there and if not I need it to go to another field and and set the record to an inactive record (via checkbox) and continue to the next record....This is what I have come up with so far which obviously is not working....I am by no means an expert but I think I may be on the right track...If anyone could offer and suggestions it would be most appreciated....Here is what I have for now...

IIf ((IsNull(Family Size), GoToControl (Active), SetControlDefault, RecordsGoToNext)

I know this is not right but may give you a better idea of what I am trying to accomplish....Any feedback again would be greatly appreaciated....Thank you for your time....
 
S

Steve Schapel

Randy,

The simplest way to do this is to use an Update Query. Just make a
query based on your table, in the Criteria of the Family Size field put
Is Null, make it an Update Query (select Update from the Query menu),
and in the Update To row of the Active field in the query design grid
put 0. Then just run the query... voila! The SQL view of this query
will look something like this...
UPDATE YourTable SET Active=0 WHERE [Family Size] Is Null;
 
R

Randy

Thanks Steve...I will use this in another method...I have found/figured out a way around the other problem but this actually helps with another issue I was having...Thanks again.....I was also wondering if there is an expression or formula that can be put into the repeat field of a repeating macro to make it go through all records or the maximum number of records a query might return? Any suggestions? thanks again for your help...As stated before, You guys are awesome!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top