Please Help With Form controlling Query (1 Viewer)

David Cochrane

New member
Local time
Today, 07:14
Joined
Oct 2, 2000
Messages
6
I am trying to control the Show/Hide ability of a Query from a From. Ideally I would like to have a checkbox in the Form that if checked leaves the Show/Hide selected but if the box is unchecked it will switch the Show/Hide to Hide.

It would be nice if this could be setup to work on the On Click Event Procedure.
I guess the vb coding should look something like this if checkbox=False then (Whatever the coding is to Hide the field in the Query.

I have been banging my head against a wall for the last 2 days on this probloem so any help would be gratefully received. Yes I am very, very new to Access (this is my 1st Database).

Thanks

David
 

Jack Cowley

Registered User.
Local time
Today, 07:14
Joined
Aug 7, 2000
Messages
2,639
Rather than showing the query directly use a form to display the results of the query. Then you can hide or show any field on the form that you like. Also, it is my opinion that it is better to display the data through a form rather than directly.

HTH,
Jack
 

David Cochrane

New member
Local time
Today, 07:14
Joined
Oct 2, 2000
Messages
6
Jack,

Thanks for the help so far. Unfortunately I haven't been able to get this to work as I was hoping. In principle the idea is sound but the problem I am having is that I want to generate a report from the results. I have setup a query a form and report. The report prints the result of the query, the form controls the results of the query. I have tried setting up the form to Display Screen Only but the field is still output in the Form.

As an overview to what I am trying to do please read the following:

I have a contacts list containing 20 fields, 10 of these fields contain information that I would like to display in the report the other 10 are for my information only. I was hoping to be able to select which of these 10 fields get printed from the report ie. 1 report may require telephone details as well as the address and contact names and anothr report would only have the contact details, company details and address.

Any other help will be gratefully received.

Thanks

David

[This message has been edited by David Cochrane (edited 10-04-2000).]
 

Users who are viewing this thread

Top Bottom