473,387 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Adding a query dependant on a form to the same form

All right, let's see if I can explain this.

I want to have a form contain three things:
1. an activex calendar which does nothing (except provide a calendar)
2. a combo box which lists employee names and feeds the selected name to a query which returns dates for that name.
3. a list box which gets data from the above query and displays it.

I know how to do 1 and 2. no idea how to get 3 to work...

to rephrase: i have a table called timesheets. I want to know in which days employees have not filled a timesheet. Seeing as how I can't figure out how to do that I decided to show them the dates they have filled in and a calendar side by side, asking them to be clever enough to figure out where data is missing. the way i want to do this is in a form, to select employee name from a combo box (populated by the employees table) and have that entered into the query as a filter to all timesheet dates. those dates remaining (which match the employee id) should be displayed in a list box in the same form AND be updated at the same time as the combo box.

any ideas?

Thanks in advance :)
Nov 25 '10 #1
4 1229
You could do worse than take a look at this!
http://bytes.com/topic/access/answer...sponding-subid
Tie listbox to your query, requery listbox on change event of combobox.
Nov 25 '10 #2
thanks for the reply

my brain is kind of spinning when i read all this

ok i requeried the listbox but i'm having a new problem and I think I know the cause. my tables are like below:

Employees (EmployeeID As Autonumber, EmployeeReadableID As String, etc.)

Timesheet (EmployeeReadableID As number, EmployeeName As String, SheetDate, etc.)

problem is that from the combo box I choose a name (string) but the dates themselves are linked to an ID (number). tried linking the combo box to the employeename and displaying that as well in the query but that doesn't work...

I'll just display all the employees and dates in that box, no frills... not elegant or functional but at least I get it to work - sort of...
Nov 26 '10 #3
Hi Adrian, well I had a go at getting something up and running for you to take a look at. If its te kind of thing you want then maybe you or I can tidy it up a bit. Not the best timesheet tracking example but it's a start.
Its easy to see what days timesheets have been omitted but could be improved.
Attached Files
File Type: zip timesheet.zip (70.4 KB, 63 views)
Nov 26 '10 #4
Wow, thanks a lot for your help :)

Looks really awesome. And I can finally understand how the hell to use the Calendar activex control

i'm just too tired to look at it though, it'll have to wait till monday

but awesome stuff man, thanks a bunch! :)

cheers
Nov 26 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Joe | last post by:
I have wrote a script to query my mysql database based up a name that is selected from an HTML list menu, the form action calls to my php script from my html doc, I have tested connectivity to the...
3
by: MX1 | last post by:
I have a query written in MS Access that has a few calculated fields. Is it possible to refer to that query in a form field. I'd like the form field to show the sum of one of the columns from the...
2
by: Ed | last post by:
If I run my Update query on its own it does the job but if I run the same query in a Form it does nothing. Can any one tell me what I'm do wrong; below the type of code I have tried Example1...
5
by: Rupert Street | last post by:
Hi I am new at setting up a database and requesting info from groups so please excuse any mistakes that I inadvertently make. I have set up a table with client info including a ClientID. The...
3
by: TomislaW | last post by:
Is it possible to add query string on requested page e.a. i have request for index.aspx, but i need index.aspx?language=en is this possible tomislaw
10
by: sandraz444 | last post by:
I have an expression in the query under my form to autofill the date under a certain condition but it wont write to the underlying table?? The date shows in the form but not the table. Does anyone...
3
by: chrismauz | last post by:
Hi, I am trying to get a query to use a combo box on a form; form name: frm_Report_Query combo name: School So in the criteria field of the query under the "School" field i type the...
2
by: dath | last post by:
Hi, Searched the forum and found a lot on passing form input to aquery but not the other way around. Here is the situation: I have a timesheet form based on a subform query that asks the...
0
by: gonalli | last post by:
dear friends i would like to save an query result in the field and also to make it appear over a form . in one-many relationship tables TABLE EMPLOYEES TABLE MEMBERSHIP employee name ...
2
by: jrohay | last post by:
I am running a query from a form in Access. Is there a way I can select a specific record based on the value of a field on the form (e.g., ). I want the user to be able to navigate to a specific...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.