By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,136 Members | 1,827 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,136 IT Pros & Developers. It's quick & easy.

Need some help with subform

P: n/a
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

Oct 7 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
>
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...
set the AllowEdits property of the subform to False.

Oct 8 '06 #2

P: n/a
Anja wrote:
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...
In a subform, usually you link the two forms together based on one or
more fields.

In your case, you might want to look at Filter and FilterOn.

Let's say the combo is called Combo1. The first column in the ID field.
You could have code in the AfterUpdate event that looks like
Me("SubFormName).Form.Filter = "ID = " & Me.Combo1
Me("SubFormName).Form.FilterOn = True
>
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
Oct 8 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.