Results 1 to 5 of 5
  1. #1
    DarrenReeder is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    9

    Creating a input form...?

    Hello,

    I have currently got three main things..

    (1) A query that gets information on a customer in my tables
    (2) A report which looks like a invoice..
    (3) A Switchboard

    Basicly i want to make a drop down box which shows the names of all the users in my database OR a input box to enter the name or something of someone then when i press enter it looks for the user and it will use that query in the report for me..



    -thanks for any help...

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    combo boxes display based on their sql statements in the recordsource property. so that'll do you for that.

    to assign the value you get from an input box, you would write:
    Code:
    variable = inputbox("please insert username")
    and of course you can use that var in a dlookup() function to get records out of a dataset using it in the criteria section.

  3. #3
    DarrenReeder is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    9
    Right, so where is all this code written? Thats the one thing that i dont entirely understand.. i understand how to code (I have used Pawn, Java, C++, Javascript, PHP etc..) but im not sure exactly where this code is written..

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    the code is written in the vb editor, Darren. since you've got the 07 version, to get there simply push Alt+F11 or go to database tools tab > visual basic.

    all the code is written there for stand alone, and split apps that don't source to a server somewhere. but that's not all you need to do if you want the code to function with other objects.

    for instance, if you write a procedure that needs to execute when a form loads, you cannot simply write:
    Code:
    private sub form_load()
    'do something here
    end sub
    in the form's module in the vb editor. It won't happen until you go into the property sheet and click those little elipsis (...) beside that event name to link that code to the object specifically.

    it's much different than php or js, as access has a separate resource and screen for scripting.

  5. #5
    DarrenReeder is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    9
    Mhmm, ive used VB quite a bit before, not extensively though.. Ill take a look into VB a bit and ill try out what you recommended..

    thanks for help mate, ill comment back here in the next few days if i have any trobules

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

Similar Threads

  1. Replies: 1
    Last Post: 11-07-2010, 11:04 AM
  2. input form
    By graciemora in forum Access
    Replies: 4
    Last Post: 06-24-2010, 01:39 AM
  3. Creating input forms for queries?
    By Brujeria5 in forum Queries
    Replies: 1
    Last Post: 08-14-2009, 08:48 AM
  4. Creating input box for query
    By dcecil in forum Queries
    Replies: 1
    Last Post: 06-23-2009, 10:08 AM
  5. Form Input Problem
    By alvin in forum Forms
    Replies: 2
    Last Post: 01-12-2006, 09:42 PM

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