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

Need some help with subform

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
2 1333
>
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jeremiah J. Burton | last post by:
I am trying to create a database (in Acces 2000) to track my fossil collection. I have a main table that has records for every specemen. I have a secondary table with information on localities...
2
by: Ellen Manning | last post by:
Using A2K. I've got a form with 2 subforms (a subform within a subform). When the user enters an amount on the main form, I place that amount in subform1 with no problem but can't seem to get it...
3
by: Paul T. Rong | last post by:
I have a listbox (of product names) control on my form. I want to pass the selected item (a product name) to a subform, and the product unitprice should apear automatically next to the product name...
14
by: alwayshouston | last post by:
Hi All! I am working on this very small database and I am confused in the designing a simple form. I only have three tables in the database. First Table: tblExpense Columns: ExpenseID ;...
9
by: Susan Bricker | last post by:
Greetings. I am having trouble populating text data that represents data in my table. Here's the setup: There is a People Table (name, address, phone, ...) peopleID = autonumber key There...
2
by: Susan Bricker | last post by:
Greetings. Before I begin, I have been stuck on this problem for about a 5 days, now. I have tried and just seem to be not getting anywhere. I know that the explanation is lengthy, but I am a...
3
by: congngo | last post by:
Below is my code. What I want do is ,after running the insert statement into tblarchive, I want to go to the subform and set focus to the record that I just added in Confirm = "'" + CONF +...
1
by: Eric | last post by:
There are two sub forms in main form. One has values: Outlet Equipment 2 ABCBCBD 3 DKJDKJD 4 KDJKDJK Second has also a variable name outlet. I need help how to i display the...
3
by: suek | last post by:
I have a table with over 4000 records to search upon, and the users don't like a combo box. So what I have been trying to do for the last twelve hours is do some code to get a text box to search. ...
1
by: sirdevo | last post by:
There is one combobox on a subform named Report Soil Series Subform1. The combobox is named cboSoilSeries. I need to disable this so the user can't enter values. I could also disable the whole...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.