Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2005
    Posts
    102

    Unanswered: QUESTIONS?? (Help please)

    How can I create a trigger that is setoff when another event happens. For example,

    If this command button is pressed (clicked) then
    do this
    Else
    do this

    I guess what I'm saying is, I have a form that contains a Tab Control, there are two pages on the control, each page contains two command buttons. Let first page be called Page1 with command buttons named Command1 and Command2 and second page called Page2 with command buttons Command3 and Command4. What I want to accomplish is, When Page 2 is clicked and command button Command2 has not been clicked/pressed, then show Msgbox stating "Please click on command2 before proceeding". Did that make sense?

    Ok my last question is, by using a form, is it possible to create a record in two tables? What I mean is if I entered a value in a form, I want that value to be saved as a record in one table but also in another table. If this is possible, how do I accomplish it?

    Thanks guys!

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Quote Originally Posted by rodrunner79
    What I want to accomplish is, When Page 2 is clicked and command button Command2 has not been clicked/pressed, then show Msgbox stating "Please click on command2 before proceeding". Did that make sense?
    Create a public boolean variable for each button, or an array that you can store boolean variables in. When a button is pressed, set its corrosponding boolean value to true. Then reference your public variables in the events requiring validation.


    Ok my last question is, by using a form, is it possible to create a record in two tables? What I mean is if I entered a value in a form, I want that value to be saved as a record in one table but also in another table. If this is possible, how do I accomplish it?
    Possible, yes. However this is questionable. Are you trying to store a history of some sort? if not, this sounds like it could be a normalization issue.

    You can do it by running insert statements independently when the value is entered on your form through the docmd.runsql method or the db.execute method.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •