User Profile

Collapse

Profile Sidebar

Collapse
TomM484
TomM484
Last Activity: Jun 13 '13, 08:10 PM
Joined: Jun 11 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • TomM484
    started a topic VBA code fails to run when compiled?

    VBA code fails to run when compiled?

    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,...
    See more | Go to post

  • 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
    See more | Go to post
    Last edited by Rabbit; Jun 11 '13, 09:55 PM. Reason: Please use code tags when posting code.

    Leave a comment:


  • TomM484
    started a topic Using combo box to control query / filter results

    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...
    See more | Go to post
No activity results to display
Show More
Working...