I have another brief question. So I am trying to protect one form on my database from being accessed by people who don't need to edit the data. I found VBA code that essentially password protects the data (it compares an input string to a hardcoded string). The code (posted below) is put into the 'On Load Event' of the sensitive form.
It works fine when I am testing it in the database. However when I compile it to a .accde executable,...
User Profile
Collapse
-
VBA code fails to run when compiled?
-
This is what MS Access gave me in SQL View for the query in question:
Code:SELECT CompoundID.CpdID, CompoundID.sortas, CompoundID.CAS, CompoundID.type, CompoundID.FW, CompoundID.BP FROM CompoundID WHERE (((CompoundID.FW)=IIf([Forms]![Search Type]![GTLT]="greater than",([CompoundID]![FW]>[Forms]![Search Type]![PointValue]),([CompoundID]![FW]<[Forms]![Search Type]![PointValue]))));
Tom -
Using combo box to control query / filter results
I am trying to use a combo box (named GTLT or "greater than less than") to sort my results based on if the Formula Weight ([FW]) is greater than or less than the PointValue given in another text box.
It seems that I am having some trouble using an iif statement here, because it will not let me change the query criteria based on if the GTLT = "greater than" or not. Here is what I have written :
IIf([Forms]![Search...
No activity results to display
Show More
Leave a comment: