Search results

  1. A

    help creating random number

    If you're looking for a 1 line solution, you can also check the help file/example for 'Randomize'
  2. A

    Error with .OnClick

    Thanks for the tip, i'll definitely start doing that to avoid future problems.
  3. A

    Error with .OnClick

    Thanks to my lesson from you yesterday, it is a standard module. HOWEVER, it is named the same thing as the function :( I'm guessing thats a bobo-nono Yep that did it. Also explains why it broke after i saved/exited because i named the module FormOpen
  4. A

    Error with .OnClick

    Inet, unfortunately I get the same error with this code as with the other.
  5. A

    Error with .OnClick

    Private Sub Form_Load() Dim strMenuPerm(4) As String Dim strMenuBox(4) As Control Dim strMenuName(4) As String Dim strMenuClick(4) As String Dim strUserID As String Dim strUsername As String Dim intDeptID As Integer Dim strDeptDesc As String Dim intAccessLvl As Integer Dim...
  6. A

    Error with .OnClick

    I'm afraid I dont fully understand... the onclick is set while the counter variable is active, Counter(2) for instance would simply set it to lbl_MenuBox3 Which is what it did perfectly before i closed/reopened the database. I would think that if it wouldn't work that it wouldn't work at all...
  7. A

    Error with .OnClick

    When i put in the code you listed bob, it worked the first time. I saved everything, exit out, then entered the db to see if it woudl all work together. Now when i click the label, i get the error 'The expression On Click you entered as teh event property setting produced the following error...
  8. A

    Error with .OnClick

    Thanks, Bob. Believe it or not i actually started with this option but I, of course, had the syntax for calling the function within the .OnClick statement wrong. I really need to find a way to learn all these syntax situations!
  9. A

    Error with .OnClick

    Is there any way to do it without having to create a separate sub for each label? Depending on the case, the labels can have different onclick needs, thats why a solution i can integrate into a select/case would fit my needs
  10. A

    Error with .OnClick

    I've got a control variable that points to different form labels depending on several factors. I use this variable earlier in the code to change the caption of the label with no problems whatsoever. However when i use this same variable to try to change the .OnClick property, I get an error...
  11. A

    Question about 'Me.'

    Thanks, Bob. The extra contextual information is always appreciated. Works like a charm. I'm working on a dynamic menu system within a single form based on the user's permission levels. I think its pretty neat. I'll post it when I'm finished to let all of you who're smarter than me tell me...
  12. A

    Question about 'Me.'

    Is it possiable to have a replaceable paramater in a "me" command. I'm using a loop and am trying to find a way to do Me.variable to change a series of labels on a form. Is this possible? If so, what would be the proper syntax? Thanks! Guy
  13. A

    Syntax with quotations

    Great info, thanks to both of you
  14. A

    Syntax with quotations

    I guess I wasn't really thinking of it as a SQL statement because I was coding in VBA. I suppose it is, though. Good to know
  15. A

    Syntax with quotations

    Syntax with quotations / DLookup I've been attempting to use DLookup in a function i'm writing and had many problems getting it to work properly. My first attempt after reading the MS help file was: ?Dlookup("[UserName]","tbl_AuthUserList","[UserID] = strUserID") Which didnt work... So i...
  16. A

    Calling a SubProc with variable

    Ugggghhhhhh! Thanks, Bob. Ashamed I didn't catch that... Guy
  17. A

    Calling a SubProc with variable

    Ok guys, still having an issue here. I made the changes that you suggested of changing the SUB to FUNCTION. This gave a new error of 'Invalid use of Null'. Which I figured was caused by no default value given to the checkboxes. So I changed the default value to FALSE of the checkboxes within the...
  18. A

    Calling a SubProc with variable

    Here's the code in its entirety as it appears in the VBA window to perhaps identify the problem (the line in which the error appears is highlighted red). Thanks again for looking at this, Guy Option Compare Database Sub ExportPLA() MsgBox "ExportPLA Called" 'Temporary End Sub Sub...
  19. A

    Calling a SubProc with variable

    You'll notice I did mention in my last post that I had tried both with and without Bob's suggestions as to the naming of the variables [to include the()]. I'm assuming that's the post you're referring to unless there's an additional one he made that I'm not seeing for some reason.
  20. A

    Calling a SubProc with variable

    I made the change to the Eval code as you both suggest, as well as tried it with and without Bob's suggested change to the variables, and I'm still getting the same error at the same point. The code line now reads: Eval (strCallSubName(Counter)) It seems like it is something small...
Back
Top Bottom