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

Trying to create conditional visibility with Access 2010

2
I am creating a database and have a combobox dropdown with two choices: "Open" or "Closed". When "closed" is chosen, I would like the "Reason for Closure" field to appear.

This is what I have so far:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Project_Status_AfterUpdate()
  2.  
  3. If Me.Project_Status = "Closed" Then
  4. Me.Reason_for_Closure.Visible = True
  5. Else: Me.Reason_for_Closure.Visible = False
  6.  
  7. End If
  8.  
  9. End Sub
This is making both the "true" and "false" statements blank.

Advice? This is really annoying!
Nov 27 '12 #1
3 3188
Rabbit
12,516 Expert Mod 8TB
I have no idea what this means:
This is making both the "true" and "false" statements blank.
However, I suspect Project_Status is a drop down. And as such, the value that is bound can be different from the value that is displayed. Are you sure the bound value is Closed and it's not just a display value for an underlying key?
Nov 27 '12 #2
kais
2
That solved it, thanks.
Nov 27 '12 #3
NeoPa
32,556 Expert Mod 16PB
I'm guessing (due to the lack of clarity in the information posted) that you are dealing with a form that is in Continuous view. In such a case you need to understand that Controls are not restricted to the current record, but the same controls are used across all records. See Why Values in Unbound Form Controls do not Persist.

There are ways around this. The simplest os probably to use Conditional Formatting. Otherwise you might need to work in the Print or Format events of the form.
Nov 28 '12 #4

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

Similar topics

1
by: phill86 | last post by:
Hi, I have an access 2010 database that I want to convert to an SQL Server database and I need to know if the data macros in access will still work in the SQL database or will i have to create...
5
by: jaad | last post by:
Hello, I have a database that was written in access 2007 on my pc. I wanted to work off site with the database so I uploaded it onto my laptop which is loaded with access 2010 beta. When I...
2
by: sierra7 | last post by:
It seems Access 2010 is associating an 'input mask' or field type with a combo box when a form is opened, even though there is no Format setting on the control. I have a form which has been...
2
by: dougancil | last post by:
I have a user who had deleted some records from a database today using Access 2010. They have an ID field that's autonumbered. They have No Duplicates allowed. When they created a new record today,...
0
by: Andolino | last post by:
In Access 2010 I get a Write Conflict error - "This record has been changed by another user..." In Access 2007 this Code is working - why? Private Sub Form_BeforeUpdate(Cancel As Integer) Dim...
1
by: Alan Yim | last post by:
Hi folks, My company recently upgraded our Office suite from 2003 to 2010. The problem in particular is with an Access database that was originally designed in Access 2003. The code in question...
5
by: colsoft | last post by:
I am using Access 2010. Am generating reports for the records, one record per page. The records on the even pages have a light black background shading which appears when am printing. Please i need...
2
by: Bill Boord | last post by:
I need to be able to shut off the AutoCorrect "feature" within Access 2010 code. I have utilized Application.SetOption with method strings for other startup requirements, but I cannot seem to find a...
1
dsatino
by: dsatino | last post by:
I have numerous applications built in Access 2000/2003 that all use ODBCdirect workspaces to access various non-Access databases. Unfortunately, ODBCdirect is 'no longer supported'in Access 2010 and...
1
by: Music Man | last post by:
Greetings All: I built a database in Microsoft SQL Server 2000 and used Microsoft Access 2010 as the front end. The database is used to keep track of "issues" that rise out of my employment. ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.