Results 1 to 5 of 5
  1. #1
    kiely is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Nov 2018
    Posts
    3

    Simple Querie pulling data from form

    I am a new access user and trying to create a simple query which will take a user selected job title from a form and then display a query that shows that selection + the corresponding job code.

    My form is titled picktitle and the user selects from a list of job titles from a list- the field where they make their selection is called jobtitle. The list the user selects from is actually the same data used in the query. I have button to run the query.
    The query is titled employee list and should display the job title and corresponding job code based on the users entry to the form. I have been working on this for days and can not figure out what I am doing wrong- I am sure its quite simple but I am getting very frustrated. Any help would be greatly appreciated.



    Thank you
    Click image for larger version. 

Name:	form.JPG 
Views:	8 
Size:	123.0 KB 
ID:	36129Click image for larger version. 

Name:	query.JPG 
Views:	8 
Size:	100.7 KB 
ID:	36130

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    make a query using the sql you have in your listbox....lets call it: qsJobCodes
    run the query...if it works,then put the query as the listbox rowsource: qsJobCodes

    if this is the Employee form, it would have txtName,txtAddr, and cboJob.
    the form is bound to tEMPLOYEES table
    the cbo box pick list ROWSOURCE is the query, qsJobCodes, of options to pick from
    bind the cbo box to the form field JOBTITLE, using the combo CONTROL SOURCE. (where the picked item in the will go)

  3. #3
    kiely is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Nov 2018
    Posts
    3
    Thanks for the quick response. I tried to make those changes but some how when I did when the drop down list in my form changed from job titles to job codes and when I select one it over writes the data in my table which is called Title and Code.
    Click image for larger version. 

Name:	form2.JPG 
Views:	8 
Size:	109.4 KB 
ID:	36131

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    im not sure what the PickTitle form is for.
    the form for the table 'title and code' should show a continuous form

  5. #5
    kiely is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Nov 2018
    Posts
    3
    PickTile is the form built for the user to select the title. When you say the form for the table 'title and code' should show a continuous form- I am not quite sure what you mean. I tried watching a number of tutorials and based on what I have seen I was under the impression the way to do this is to create a form and then create a query that uses the selection from the form. I linked the form and the query together through expression builder.

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

Similar Threads

  1. Replies: 4
    Last Post: 03-24-2018, 09:59 AM
  2. Replies: 3
    Last Post: 11-14-2016, 08:47 AM
  3. Pulling data into a form from query on a web app
    By DianeArthur in forum Access
    Replies: 0
    Last Post: 08-07-2016, 10:46 AM
  4. Replies: 6
    Last Post: 05-06-2015, 12:56 PM
  5. Replies: 5
    Last Post: 12-27-2012, 02:54 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