473,406 Members | 2,707 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,406 software developers and data experts.

How to get certain fields visible depending on other values in access form

4
Hello,

I'm struggling with figuring out how to have my form auto select certain fields in access 2010.

I only want fields to show up on a form if certain data was entered in a field in a diff form.

Ex, If Form 1 had a selection of fruits (Apples, Oranges, and Blueberries

then I want form 2 to have the field Apples there and all possible dessert selections for Apples , (apple pie, apple crisp, etc.).

but if blueberries is selected in form 1, I dont want form 2 to show possible apple desserts, I want it to show only possible blueberry desserts.


I hope this makes sense. My actual database is for patient testing and patient results. Since there are so many possibilities for both, I don't want all possible results in the form, only possible results based on testing selected in form 1, and I want to be able to refine the possibilities even further when certain result options are selected. But I'm not sure where to start on this one.

Thanks!
Sep 6 '13 #1
7 4516
I have done somthing very similar

using your scenario i created two tables the 1st had the fruit and the second had the fruit again in the 1st columns then a dessert in the second.

i then created a form with a combo box that looked at my fruit table

i then created a query that looked at my dessert table and added criteria that looked at my form = [Forms]![Fruit Form]![Combo2]

i then created a second form with the query as my data source

any problems i can send you a copy of the database i created

Regards
Sep 9 '13 #2
Amian
4
Maybe some more information might help.

Form 1 is frmPatientTesting

Form 2 is a copy of form 1 with an embedded subform - Form 2 is called frmPatientResults

I created form 2 a copy of form 1 because I wanted all the demographics for the patient to be visible and read only so I disabled all the fields and it works so that I see all the patient fname, lname, dob etc.

Now in form 2 since it's a copy, it sees all the possible testing options and those that were selected in form 1, all i want to see in form 2 are the selected options from form 1, not any unselected ones.

I created a a query that looked at my tblPatientTesting and the criteria was from form 1 and made that the data source for form 2. That didnt actually refine my data in form 2, I still see everything from form 1. Did I do something wrong?
Sep 9 '13 #3
zmbd
5,501 Expert Mod 4TB
Amian
are you using VB or VBA to do this with?
Sep 9 '13 #4
not 100% sure what you mean, i dont think this is a VBA or VB issue.

if you can send me a copy of the database with fictional data i can have a look

E-mail me at [z{Modedit - email redacted}]
Sep 12 '13 #5
zmbd
5,501 Expert Mod 4TB
Amian:
You do not need to send nor attach your database in anyway what so ever.

What you need to do is answer my question!
Are you working in the Native Access application and using the form designer and VBA editor
OR
Are you working in VB or VB.Net?

If you are using the Native Access editors, then:
  1. this is the wrong forum
  2. Your question can be solved in at least three very simple ways
    2a) Leave the 1st form open, hide it, and refer to the values either directly from the second form or within a parmeter query
    2b) Pass the values from the first form to the second using the DoCMD method
    2c) Use a parent/subform configuration.
    2d) Use a single form with combobox that sets the filters for the form or for the rowsource
  3. We may need to look at how well your database is normalized I refer you to the following: > Database Normalization and Table Structures. Having a very good understanding of this concept is VITAL to making your life easier when you start data-mining your information. Both forms and queries will almost write themselves (well, maybe not that easy; however, you should get my point).
Sep 12 '13 #6
sorry zmbd im new to this forum and the rules are different to what im used to

as for the question, i also agree with zmbd response

lesson well and truly learned
Sep 12 '13 #7
Amian
4
Hi zmbd,

I'm using VBA in MS Access.

Thanks,
Sep 18 '13 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Chumley the Walrus | last post by:
In an data insert script, I'm trying to insert a field (userid) with a textbox object, but I want it to be invisible to the user so the user cannot change it inside the textbox: <td...
1
by: Chumley the Walrus | last post by:
Is there anyway inside a datagrid's parameter list to disallow certain fields in the dataset to be viewed ?
4
by: karenmiddleol | last post by:
I have the following form the user enters the From and to period and presses the Submit button and the form fields are cleared once the submit button is pressed. Is there a way I can keep the...
2
by: llucas | last post by:
After saving a record using a form, I want certain fields on the data entry form to display the same information from the previous record.
1
by: Stanton | last post by:
I'm trying to make a form so that you can choose a colour (numbered 100, 101 or 102) - in which to bind a book - from an option group. I've done this, but what I then want to do is have an option...
12
by: metalheadstorm | last post by:
ok how do you do and if statment to see if a value is between to other values such as If test.Text >= 20 Then Hopperfullpic(0).Visible = True Hopper1pic(0).Visible = False ...
14
by: PhilS | last post by:
Hi everybody, I'm new to the forum and Access and hope you can help with the following question using Access 2000: I would like to have a value displayed in a text box based upon two other values....
2
by: tenchyz | last post by:
I want to put fields from four tables into one table. I created a new table, but how do i get the same fields from the other tables to this table along with primary and foreign keys. ...
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
24
by: MNNovice | last post by:
tblExpDetails has various fields including two Yes/No fields and one Category field. frmExpDetails is based on this table. I would like to add some restrictions wWhen an end user is using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.