473,396 Members | 1,826 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,396 software developers and data experts.

Criteria problem in a select in Row Source

2
Hi,
I have something that looks simple but that I cannot solve.
I have 2 tables 1 table TASK, and table SUBTASK.
I m creating a timesheet Table to record time for each SUBTASK, table is as follow : TASK,SUBTASK,TIMESPENT.

I want a form to let fill the timesheet table where the user can choose the task from a combo list, and then the subtask form another combolist. The 2nd combolist should only show the SUBTASK belonging to one Task.
For the SUBTASK I have row source Type and as TABLE/QUERY and in the Row Source I ve put a SELECT with a criteria such as: WHERE SubTask.SubTaskID=Form!TaskID;
On the form, whatever the row i used, the result is always the same whatever the TaskID. It seems that Form!TaskID always keep the same value.
Any advice?
Thanks a lot
Fred
Nov 16 '07 #1
3 1581
NeoPa
32,556 Expert Mod 16PB
Check out (Example Filtering on a Form). This is not exactly what you're after but it does include the filtering technique you need.
Also, make sure your ComboBoxes are bound to the underlying table on your form. That way the results selected can be save easily in the new record.

Let us know if this helps and how you get on :)
Nov 16 '07 #2
XfredX
2
Thanks very Much, I succeed by using some refresh function on the main form, I don t know if it is the best solution, bu it works well
Dec 6 '07 #3
NeoPa
32,556 Expert Mod 16PB
I'm glad you found a resolution :)
Refresh is good, but if any records are added or deleted then a .Requery will be required instead. Refresh only re-grabs the data for existing records. Requery reruns the whole query.
Dec 9 '07 #4

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

Similar topics

5
by: M Wells | last post by:
Hi All, Is it possible to use form criteria in a query / view in an Access 2003 ADP with SQL Server as the backend? ie something like: select * from mytable where recid = forms!! I'm...
0
by: Greg Strong | last post by:
Hello All, In the past I've used a combo box with the 'row source' being an Access SQL union query to select "All" or 1 for only 1 criteria in a query. An example is as follows: SELECT 0 As...
3
by: MLH | last post by:
Am repeating question with different subject heading, perhaps stating more clearly my problem... I have an A97 query (qryVehiclesNowners2) that has a table field in it named . Depending on the...
1
by: SteMc | last post by:
I have two comboboxes on a form. Combobox1 uses field1 in another table as its source of data. What I want to do is to enable combobox2 to use field2 in that table, but only to show the rows of...
2
by: Mark Roughton | last post by:
I have a form where the users need to view records for various criteria, one of which is a date field on which they may wish to view all related data for the selected date, for all dates upto and...
3
by: rhobson2 | last post by:
Hello, I wrote a database applicaiton using Access XP (2002) and everything has been working good for the client until they purchased a couple of new computers with Access 2003. The meetings...
10
by: aaronrm | last post by:
I have a real simple cross-tab query that I am trying to sum on as the action but I am getting the "data type mismatch criteria expression" error. About three queries up the food chain from this...
3
by: Clearview | last post by:
This is my first post to the forum and hoping I can get help as I have spent a way too much time on this problem, and thinking it is probably something really simple to resolve. I am using Access...
2
by: psychomad | last post by:
Please, can someone help me out to solve this error, i've been searching throughout my codes and yet i didnt succeed in finding the error!!!! The Error is: Server Error in '/' Application....
11
by: woodey2002 | last post by:
This problem is driving me crazy. Hello there, i am trying to create a search form for records in my access database. The search form will contain text boxes and a multi select list box. The user...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.