Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    May 2009
    Posts
    17

    Unanswered: Access - inputting form data

    Hey all,



    I hope you are well and enjoying the lead up to christmas.



    I write to you in the hope you can help me like you have before (percentile problem)



    i am now using microsoft 2003 and am having problems creating a form that allows you to input data which is stored on a table.



    The form itself i require to be automatically inputed once the user id is filled in.



    Table headings in database are as follows



    Table users


    Userid

    Firstname

    surename

    email address

    description

    Manager


    Table logs (need a form for this table)


    Userid

    Firstname

    surename

    email address

    contact number

    Manager

    Issue Category

    Issue Description

    Date Created


    Everytime a engineer gets a call from a user he requires to complete the form, the user who calls should be in the list of users loaded and stored in database, therefore when the engineer starts to input the users name in the form field (userid) a suggestion from the users table should appear and complete the name for you.



    once the name is selected all other details from the users table (that are on the form table first 6 listed under table logs) should automatically populate the form.



    I know this is realtively easy but i am having great difficulties with errors and cascading combo boxes (if that is the correct way)



    Any help you can provide will be great.



    Once again i thank you in advance.



    Sean

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Christmas?!

    It's barely October you know?

    So, what is it you want us to do... write a book on creating forms or what? I think you need to do the job as far as you can and tell us where you get stuck -- and why!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    May 2009
    Posts
    17
    Hey Startrekker,

    Thanks for the words of wisdom it motivated me to go out and solve most of my issue.

    I have manged to use VBA code to auto populate text boxes from an input to a combo box

    However

    I am having trying to do the following and am having problems, if there is anyway you can guide me or even point me to some material that may help it would be great.

    1) i have 2 fields field1 and field2, when i start to input a username into field1 i want field2 to show all usernames that have the same wording/text in their username untill a point i select one. (both fields will reference the same users table)

    2) on my users table their are 2 types of users 1) active and 2) Inactive i have 3 radio buttons that i want users to select to say whether they want to search the 1) active users or 2) inactive users or 3) All users for the username they are about to enter in field1

    Any support would be much appreciated

    Look forward to hearing from you.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    1) i have 2 fields field1 and field2, when i start to input a username into field1 i want field2 to show all usernames that have the same wording/text in their username untill a point i select one. (both fields will reference the same users table)
    So you'd have a list box interrogating your users data with the text box as a criteria for the appropriate field. You would update (requery) this list box OnChange of the text box.

    Have you tried just using a combo box with AutoComplete on? I find these quite effective for small data lists like user selections.

    2) on my users table their are 2 types of users 1) active and 2) Inactive i have 3 radio buttons that i want users to select to say whether they want to search the 1) active users or 2) inactive users or 3) All users for the username they are about to enter in field1
    No problem, just add these as part of your criteria for the row source of your list box.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    May 2009
    Posts
    17
    StarTrekker,

    Just to confirm

    1) i have a combo box that is interrogating the users table and when i start to enter a username in this combo box i want a seperate box (text box) to list all teh possible usernames that contain that particular string of text for instances if i have 4 users with teh surename smith in my users table i want the text box to show all 4 instances allowing me to select one that will appear in the combo box.

    2) in regards to the 3 radio buttons - i am totally lost - it seems there is a very simple way of doing this but i for the sake of me cant find it! what text should i be writing in the criteria query and how would the sql pick up the radio button selection?

    Sorry to annoy you.

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    No annoyance mate

    Don't expect to get the list of matching users in a TEXT BOX though... you'll need a LIST BOX.... which can have a query behind it... a text box cannot.

    Which field in your USERS table identifies whether the user is active or inactive?
    What are the values of your radio button selection for each?
    What group object are they in?

    I can give you some criteria, but it won't make sense without these names.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    May 2009
    Posts
    17
    Hey mate,

    Good news is i have managed to crack the radio buttons issue using SQL in the row sauce and an if statement in vba.

    thanks for all your patiance and support.

    However i am still trying to diaplay all macthing types in the list box (Username Matches....) to the names i insert in the username combo box.

    any ideas? please see below for the names of each object .

    What i am trying to to is one a user selects active / inactive or All, they then proceed to typing in a username in the combo box called 'cbonames' as they start typing a list of all corresponding usernames in the users table (users) appears in the list box called 'lboxusernames'

    once name found there should only be 1 entry in 'lboxusernames' and i want the user to click on that name to have it displayed in the 'cbonames' field.

    i also require the updating of data if i was to delete a name in the cbonmaes field and start typing fresh the names should disappear from the boxusernames field and update with new chrecters im placing in, requery???

    any thoughts or ideas would be great!

    Thanks a million StarTrekker!

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Ok so in your SQL behind your list box, you should specify a criteria such as:

    Username Like "*" & Forms!YourFormName!cboNames & "*"

    Then you just need to run a

    Me.lboxUserNames.Requery

    In your cboNames_Change() event procedure.

    That should get you on the right track.

    Mind you, I don't actually see the point in using a combo box... a text box might do since the names will be in the list box.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  9. #9
    Join Date
    May 2009
    Posts
    17
    hey mate - that looks perfect however it does not display the name in the list box as i start typing unpdating each time i input a charecter - it waits till i clikc enter on keyborad.

    anyway i can turn this off and make it so it updates when i input a charecter ?

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    When you input a character, does the code run? It should. If it is in the On Change of the combo box....
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  11. #11
    Join Date
    May 2009
    Posts
    17
    when i input a charecter the code does not run untill i hit enter!

    and even when i hit enter it does not up[date username matches (list box) till i change a charecter in Username (combo box)

    have i place the requery in wrong place - any ideas?

  12. #12
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    it does not update username matches (list box) till i change a charecter in Username (combo box)
    Where are you inputting the character and pressing Enter then!? I was expecting this to be the combo box!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  13. #13
    Join Date
    May 2009
    Posts
    17
    Correct,

    i enter the name in teh combo box and click enter.

    Whilst i am entering the name in the combo box ("Username")i hope to see all the names that match teh text (so far) top be shown in the "username matches" (list box)

    i.e
    if i have the following names in the table

    Startrekker1
    startrekker234
    Startrekker2345

    when i enter 'star' and look at "username Matches" list box i should see all 3 names without having to press enter. then when i continue and type in 'Startrekker2' i should then see 'Startrekker1' dissappear and only the remaining 2 that match teh text present in the listbox

    all of this without me having to press enter.

    Hope thats clearer apologise for the back n forth!

  14. #14
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Ok, since I have rarely used On Change, I am going to doubt that it fires at every keystroke, so perhaps try putting the requery command in your On KeyPress instead of On Change and see how that goes.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  15. #15
    Join Date
    May 2009
    Posts
    17
    still no progree - could it be the key press looks for interger not a charecter?

Posting Permissions

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