Pls help-Queries thorugh form fields

pooja.bhandari

Registered User.
Local time
Today, 14:02
Joined
Sep 21, 2006
Messages
18
Hi ,

I need to make a Training Management System as directed by my Boss urgently

Well the problem i m facing is When i update the value in text boxes/Combobox of a form and click 'Display Results' Button to display the results of a query based on Text boxes/Combo-box values, it gives me nothing.
Query is perfectly correct, i checked it. I dont know why it is not picking the updated values of textboxes/combobox on the form.

I am not using any kind of programming/ code in this Project.
I am using only Accesss nothing else even not VBA, dont have licence of SQL Server etc.
 
Changing or updating a field on a form does not change the table until the changes are saved, either by closing the form or having a "save changes" button.


Col
 
query through form

Hi,
I dont want to change table. I just want to make a query on basis of values selected/entered by user in the form.

Pls tell me how to save the form.
 
I dont want to change table. I just want to make a query on basis of values selected/entered by user in the form

Then you refer to the form in the query criteria.

Code:
[Forms]![FormName]![FieldName]

Pls tell me how to save the form

I did

Col
 
ColinEssex said:
Then you refer to the form in the query criteria.

Code:
[Forms]![FormName]![FieldName]
I am doing the same Colin. I am writing query as below :

SELECT [Trainee-info].[Emp-Id], [Trainee-info].Fname, [Trainee-info].LName, [Trainee-info].Institute
FROM [Trainee-info]
WHERE ((([Trainee-info].[Batch-Id])=Forms![QBF-Form]!batch) And (([Trainee-info].[Th-No])=Forms![QBF-Form]!thno)) Or ((([Trainee-info].[Th-No])=Forms![QBF-Form]!thno) And ((Forms![QBF-Form]!batch) Is Null)) Or ((([Trainee-info].[Batch-Id])=Forms![QBF-Form]!batch) And ((Forms![QBF-Form]!thno) Is Null)) Or (((Forms![QBF-Form]!batch) Is Null) And ((Forms![QBF-Form]!thno) Is Null));



I did

Means??? pls explain.

Col
I am databse with this mail. Pls the form check it once.
Pls check why it is giving pop-up box to ask 'Batch-Id' and 'h-No'
 
Queru through form

ColinEssex said:
Then you refer to the form in the query criteria.

Code:
[Forms]![FormName]![FieldName]

I am doing the same Colin. I am writing query as below :

SELECT [Trainee-info].[Emp-Id], [Trainee-info].Fname, [Trainee-info].LName, [Trainee-info].Institute
FROM [Trainee-info]
WHERE ((([Trainee-info].[Batch-Id])=Forms![QBF-Form]!batch) And (([Trainee-info].[Th-No])=Forms![QBF-Form]!thno)) Or ((([Trainee-info].[Th-No])=Forms![QBF-Form]!thno) And ((Forms![QBF-Form]!batch) Is Null)) Or ((([Trainee-info].[Batch-Id])=Forms![QBF-Form]!batch) And ((Forms![QBF-Form]!thno) Is Null)) Or (((Forms![QBF-Form]!batch) Is Null) And ((Forms![QBF-Form]!thno) Is Null));

Pls check why it is prompting me to enter 'Form ! QBF-Form ! Batch' and ''Form ! QBF-Form ! Th-no' in the pop-up-box.
 
You're missing the square brackets.

Create the query in the query grid, its much easier.

Col
 
ColinEssex said:
You're missing the square brackets.

Create the query in the query grid, its much easier.

Col
I had created query in design grid only but sent you by editing it in SQL mode.
I annoyed of this problem since last 5 days.
Can u give me your email-id so that i can send you my database.
Here on forum i am not able to attach it.

Thanks in anticipation.
Cheers,
Pooja
 
Make a small sample database of your problem and post it.

Col
 
You have posted the same question 3 times (at least) and have 3 different people answering you.

I will discontinue this in the hope that it reduces the confusion.

Col
 
If everything is spelt correctly and all syntax checks out then maybe you have inadvertently closed the Form before running the query.

Brian
 
ColinEssex said:
Make a small sample database of your problem and post it.

Col
Ok Thnaks Colin.
I am attaching the file as Zip file. Pls do the needful.

Thanks a ton !!
 

Attachments

You said that there was no code but there is a fair bit behind the form and the display button runs a macro to run the query. I don't do macros so don't know if that is the problem but dumped that form created another where the display command button runs the query directly and all worked fine.

Brian
 
No its is not giving me only those records which have batch-id 60918 and Th-No 9
It shows all records......
Colin, MsTef, BrainWarnock.......pls go the attachment and help me out .i am in need........Urgently.......
 
Can Anybody correct my Form query-Pls help

Pls help, i have to comlete this big assignment by end of day.
i'll be highly obliged.........
Pls reply.
 
It works fine for me. Ok maybe its too late now but I attach the DB with modified form.

Brian
 

Attachments

Users who are viewing this thread

Back
Top Bottom