cancel
Showing results for 
Search instead for 
Did you mean: 

Access macro

N/A

Access macro

I nknow hardly any VB, however, I know that macro are one of the worst things you can use in access.

However, I have found them dirt handy as validation, before launching other tables or real VB code.

My problem at this time, is that I am unable to perform some validation, and it is driving me crackers.

One of the most complex forms on the database needs to be manualy driven. Several unrelated values from accross the database are colated into parts of the form, before it is finaly submitted. At this point, the data is then split accross several tables and now the data becomes related.

I have completed all but the insert section of the form, which is stuck on validating that all items are entered, within bounds and that they certain feild are only empty when certain conditions are met.

There are roughly 75 text boxes on the page, many of them hidden. The ones on display are only so the user can see what has been completed. The hidden ones are the data to insert.

One item relates to an entry in an address book. The ID feild will be blank to start and once populated, contain the primary key of the address book entry.

In the macro, i am attempting to validate if a contact has been entered, but it continiously fails by passing all conditions thrown at it.


Len(CVar([Forms]![OutgoingsAdd]![gid]))<1


Can anybody tell me if there is a way to tell if a feild it blank. Some of the stuff I have tried (and veriefied before pasting here).


Len([Forms]![OutgoingsAdd]![gid])=Null
CVar([Forms]![OutgoingsAdd]![gid])=Null
Len([Forms]![OutgoingsAdd]![gid])=""
CVar([Forms]![OutgoingsAdd]![gid])=""


That is only a small subset of what I have tried.

It is fine and dandy if there is a value, and I can detect if it is in bounds, i just can't tell if the feild it empty
1 REPLY
N/A

Access macro

I know absolutely no VB but I'd have thought there was an access function specifically to test for null eg IsNull(field) ...