Results 1 to 4 of 4
  1. #1
    cross is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    8

    Question Event Procedure Prompts for Input But Code Does Not Reflect This

    All -

    I've been working on a database that was created in 1999 - it has since been converted to Access 2010 (.accdb). The main form has several buttons that, when clicked, execute a macro (OnClick = [Event Procedure]). Some of the procedures prompt a user to key in a value (numerical, string, or both) before displaying a form with data filtered by the values that were keyed in by the user.

    When I view the code for the Event Procedures attached to these buttons (in the Visual Basic environment), I do not see any commands that prompt a user for input. I'm expecting to see a MsgBox or InputBox somewhere in the code but I do not.

    Example, the following is the procedure for a button that, when clicked, the user is asked to: "Enter the initials of the Rep Engr" before the form opens and displays the specific records for the person with the initials keyed in by the user:

    Private Sub Button44_Click()
    On Error GoTo Err_Button44_Click

    Dim DocName As String


    Dim LinkCriteria As String

    DocName = "Tooling - CDI Schedule"
    DoCmd.OpenForm DocName, , , , , acHidden
    Forms![Tooling - CDI Schedule].RecordSource = "Tooling - Active Programs By Rep Engr"
    Forms![Tooling - CDI Schedule].Visible = True
    Forms![Tooling - CDI Schedule].Caption = "Active Tools By Rep Engr"

    Exit_Button44_Click:
    Exit Sub

    Err_Button44_Click:
    MsgBox Error$
    Resume Exit_Button44_Click

    End Sub


    Concern:


    I do not see any code where "Enter the initials of the Rep Engr" is set as the display text of the input box. Am I missing or overlooking something? Where can I find the code/the settings so I can eliminate the prompts or at least modify the text in the prompt's message?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Maybe there is a parameter in the query object named, Tooling - Active Programs By Rep Engr

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    As ItsMe points out, dynamic parameters in query can trigger input popups. I never use them. Here is example of dynamic parameterized query http://www.datapigtechnologies.com/f...earchform.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    cross is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    8
    @ItsMe - Thanks for pointing me in that direction - you are correct, the query object did have [Enter the initials of the Rep Engr] as a criteria.

    @June7 - Thanks for the link! It seems I still have a lot more to learn about using Access, in general. I don't think I would have used dynamic parametrized
    queries either but I guess it worked best, at the time, for the database creator :-\

    Thanks for your quick responses, I'll mark this as Solved.
    Last edited by cross; 08-14-2014 at 01:19 PM. Reason: grammar

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 08-22-2012, 07:32 AM
  2. Replies: 3
    Last Post: 05-07-2012, 12:17 PM
  3. Replies: 4
    Last Post: 07-17-2011, 06:07 PM
  4. Replies: 1
    Last Post: 07-08-2011, 10:26 AM
  5. Replies: 4
    Last Post: 05-18-2011, 03:24 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums