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

Data Access Page - how to change visibility based on criteria?

Hi - I'm putting together a status report summary for a team of about 15 based in the US (various places), London, Hong Kong, etc. The users have expressed interest in using a web form (data access page), which I have submitting data to an Access db on a shared network repository. They want the forms to be saved in a Sharepoint repository for easy access. So far, so good.

Where I need a little help is in setting the data access page to hide or show some controls based on the type of update being submitted. For example, if they select the option "OUTAGE" from a combobox control, I want to show fields A, B and C, but hide X, Y and Z.

I'm sure I could convince them to ditch Sharepoint and just put a shortcut to a form (instead of the data access page), but I'd like to give them what they asked for if it's possible.

Thank you for any help!
JP
Oct 30 '08 #1
3 2564
DonRayner
489 Expert 256MB
Hi - I'm putting together a status report summary for a team of about 15 based in the US (various places), London, Hong Kong, etc. The users have expressed interest in using a web form (data access page), which I have submitting data to an Access db on a shared network repository. They want the forms to be saved in a Sharepoint repository for easy access. So far, so good.

Where I need a little help is in setting the data access page to hide or show some controls based on the type of update being submitted. For example, if they select the option "OUTAGE" from a combobox control, I want to show fields A, B and C, but hide X, Y and Z.

I'm sure I could convince them to ditch Sharepoint and just put a shortcut to a form (instead of the data access page), but I'd like to give them what they asked for if it's possible.

Thank you for any help!
JP
in the "After Update" event procedure for the combobox control use either IF or Select Case arguments to set each of the fields visible properties based on the value of the combobox. Eg:
Expand|Select|Wrap|Line Numbers
  1. If me.combobox = "update1" then
  2.   me.control1.visible = true
  3.   me.control2.visible = false
  4. Elseif me.combobox = "update2" then
  5.   me.control1.visible = false
  6.   me.control2.visible = true
  7. Elseif...... (up to however many selections you have)
  8.  
  9. Else
  10.   me.control1.visible = false
  11.   me.control2.visible = false
  12. End If
  13.  
Or with a Case statement
Expand|Select|Wrap|Line Numbers
  1. Dim mycontrol as string
  2. mycontrol = me.combobox.value
  3. select case mycontrol
  4.   case "update1"
  5.     me.control1.visible = true
  6.     me.control2.visible = false
  7.   case "update2"
  8.     me.control1.visible = false
  9.     me.control2.visible = true
  10.   case....(up to however many selections you have)
  11.  
  12.   case else
  13.     me.control1.visible = false
  14.     me.control2.visible = false
  15. End Select
  16.  
Oct 30 '08 #2
This is fantastic! Thanks a million
Nov 10 '08 #3
DonRayner
489 Expert 256MB
Glad I could be of some help
Nov 11 '08 #4

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

Similar topics

4
by: Dave Smithz | last post by:
Hi there, When filling out a web form on a php page that is submitted to a search which lists the results based on the criteria provided (in the form), all works fine and as expected. ...
12
by: Lee David | last post by:
How do you track down this to where the error actually is? TIA, Lee
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
6
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a...
0
by: TheCoder | last post by:
I am making a D-base with web conectivity for my class project. I have everything working but the subit button sends the data to the correct fields but afterwards it wants to reproduce new blank...
16
by: Andy_Khosravi | last post by:
I'm in a bit of a pickle. My employer, a health insurance firm, had me design a small database to track benefit issues. The intended users were technical specialists and some managers (about 90...
9
by: VMI | last post by:
We have this huge application that's based on storing tons of data on a dataTable. The only problem we're having is that storing LOTS of data (1 million records) into a datatable will slow down the...
13
by: nyt | last post by:
I have a problem of number and text field. I got the database file(mdb) that contains many combo boxes used and its list values are created by "value list" For eg field Field name= 'furniture'...
3
by: toodi4 | last post by:
I'm using a javascript that hides and unhides text based on a button click. It works great across static fields on a form. The problem I have is that I'm trying to hide and unhide various fields...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.