Search results

  1. E

    Solved Form_Unload Event

    I've done that for the switchboard form but not too sure how I would do that for the Access program itself. Thats the reason I went with the cancel=true route. Im working on coding the boolean but might just leave it as is.
  2. E

    Solved Form_Unload Event

    I am not too familiar with boolean variables. Any chance you know where I can look for samples or if you got an example as to where I can start?
  3. E

    Solved Form_Unload Event

    Hello All, Back at it with a little syntax situation. I've been trying to prevent folks from closing the database by simply clicking the "X" in order to avoid any issues with events and VBA coding. I have a form that loads hidden whenever they log in and have place this code (see below) to...
  4. E

    Solved Updating Sub-form with OnClick event of other Sub-Form

    Got it now! I keep forgetting the syntax is different when the field is not a number. The code below works perfectly. [Forms]![Mission Control]![AuditClicksMC].Form.Filter = "User =""" & [Forms]![Mission Control]![User] & """" [Forms]![Mission Control]![AuditClicksMC].Form.FilterOn = True
  5. E

    Solved Updating Sub-form with OnClick event of other Sub-Form

    User name is not a number field
  6. E

    Solved Updating Sub-form with OnClick event of other Sub-Form

    Hey Guys, Back at it with some VBA mischief...Looking for a little help on syntax with an OnClick event that is not firing very well/at all. I have the mainform (Mission Control) and two sub-forms (AuditClicksMC) and (Current-User) I've wanted to filter the (AuditClicksMC) based on the...
  7. E

    Solved Docmd.RunSQL INSERT INTO...

    Thanks! Got it! See below - DCount("*", "tblCurrentlyLoggedIn", "empCurrentlyLoggedIn=" & Chr(34) & CurrentUser() & Chr(34)) > 0 And DCount("*", "tblCurrentlyLoggedIn", "empEnviron<>" & Chr(34) & Environ("computername") & Chr(34)) > 0 Then MsgBox CurrentUser() & _ vbCrLf & " " & _...
  8. E

    Solved Docmd.RunSQL INSERT INTO...

    That would give the computer name they are using but I want them to be able to know which computer they are already on from the tbl. Would a Dlookup() work in this case?
  9. E

    Solved Docmd.RunSQL INSERT INTO...

    Hey guys, back at it again. I need some help with syntax once more. Got the code below and want to include the Computername listed in the tbl for the record that matches the Currentuser() in the MsgBox after the "you are currently Logged-in " text. Any ideas or is there another way of doing...
  10. E

    Solved Docmd.RunSQL INSERT INTO...

    Thank you both So much! They work perfectly. Game changing stuff. Thank you for all the help.
  11. E

    Solved Docmd.RunSQL INSERT INTO...

    Thank you for the help. I really appreciate it. The code works perfectly. How would I adjust the Close code to only delete the record if the Environ() matches? It works well enough and deletes the record that matches the user name but will delete ALL the records that match. I want to make...
  12. E

    Solved Docmd.RunSQL INSERT INTO...

    Actually, I am using the original mdb file for the backend with a accdb front-end. The mdb file has the old user security file associated, so they use a username and password from that security file.
  13. E

    Solved Docmd.RunSQL INSERT INTO...

    Thank you. I am getting a syntax error with "Insert Into"
  14. E

    Solved Docmd.RunSQL INSERT INTO...

    DoCmd.RunSQL "INSERT INTO tblCurrentlyLoggedIn ( empCurrentlyLoggedIn, empEnviron ) " & _ "SELECT CurrentUser() AS Users, Environ("Computername");"
  15. E

    Solved Docmd.RunSQL INSERT INTO...

    This is the error I get. Putting "computername" in quotes like that turns all the code red. Not sure whats going on
  16. E

    Solved Docmd.RunSQL INSERT INTO...

    Thank you all. This helps. However, it is giving me an error with Environ()...is the syntax for this not correct?
  17. E

    Solved Docmd.RunSQL INSERT INTO...

    Hello All, I have this code (see below) for keeping track of users logged in...It is in the "Form_Load" code and opposite code to delete in the "Form_Close" code. I've just added a field to the table - [tblCurrentlyLoggedIn]; [empEnviron]. I added this field because I want to capture the PC...
  18. E

    Check Table for User Name, prevent log-in or log-off 1st instance

    I made something similar. With a few extra features.
  19. E

    Check Table for User Name, prevent log-in or log-off 1st instance

    Thank you. Put together something like this. Works good so far. Testing currently.
Back
Top Bottom