Need some help with subform

  • Thread starter Thread starter Anja
  • Start date Start date
A

Anja

Hi everyone,

Well, kind of new to Access and VBA development in general.

What I have a query that returns me all records based on a criteria.

Now, I have a form where the user can choose this criterial via a combo
box and I want a sub form to show up with the relevant records.

I have 2 questions actually...

I tried the sub form wizard and I can point it to the Query but how can
I specify the where clause whith which it should filter the query
results...

How can I make it that the user can only view the data and not edit the
data in the sub form. Right now, it allows me to make changes to the
database through the cells in the sub-form. Can I stop that...

Cheers and thanks for any help you might give me.

Anja
 
Answers in line:

Now, I have a form where the user can choose this criterial via a combo
box and I want a sub form to show up with the relevant records.

I have 2 questions actually...

I tried the sub form wizard and I can point it to the Query but how can
I specify the where clause whith which it should filter the query
results...

The where clause is the criteria box in the query. If you want to point it
to a value in the main form, use the expression:

Forms!MainFormName!ControlName
How can I make it that the user can only view the data and not edit the
data in the sub form. Right now, it allows me to make changes to the
database through the cells in the sub-form. Can I stop that...

In the property sheet of the subform, go to the Data tab and change the
Allow edits, Deletions properties to No, or select the controls and Lock or
disable them (or both)
 
Back
Top