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

keeping a visible field change on a form in access

I have written some code using VBA that hides certain fields when options are selected in the form.

It works in the first instance but if I go back to the record again later the fields have all re-appeared again. I need to re-select the options and the fields I want to get the right fields to disappear again.

How do I get this to happen without re-clicking fields?

Russell
Jan 6 '15 #1
1 844
jimatqsi
1,271 Expert 1GB
It sounds like your decisions are based on objects on the screen that are not saved in the data. Or else your instructions to hide the fields are not being run when you need them to.

What event are you using to run the hide instructions? Try putting your instructions in the OnCurrent event of the form. That way the code is run every time you advance to a new row.

You probably want to put this code in a subroutine and then call that subroutine from the OnCurrent event of the form and also from each object's AfterUpdate event for those objects that affect the appearing/hiding of the fields.

Jim
Jan 7 '15 #2

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

Similar topics

8
by: Vladimir | last post by:
Hello, I have a table in MS Access database. It has one field (with BYTE datatype) that has several properties set in Lookup tab of table Design View. Display Control = Combo Box. Row Source...
4
by: Apple | last post by:
Can I edit an calculated field in my form if needed. Thank you in advance for your help. Sincerely Apple
0
by: RML | last post by:
Hi all, in my VB.NET app I would like to make a field in an Access Table the Primary Key. I've tried using an OleDBDataAdapter and DataTable with no success... Note: There is only 1 field in...
2
by: Nuno | last post by:
How can i change the access modifier of a control from protected to public if the designer code is not visible to the developer? I tryed declaring it on the page but it throws a compile error...
3
by: Alexio | last post by:
I need to enter a date into a text field when form is loaded. However I need this date to be static when the form is opened at a later date. I have the text box set to readonly. Will this be...
2
by: lwannwayoo | last post by:
Hi Everybody! I have a database in Microsoft Access 2003 and I want to insert image in my Table Field. How can I don it??. I use OLE type but when i insert image to that field only the word...
1
by: Avinash Gupta | last post by:
hello, i want to insert a text field value into access data base file. but there is a problem that i have a single text field of month and in database there is 12 coloms of...
1
by: newtoaccessvba | last post by:
I am not too familiar with VBA in Access, but I would like if someone could show me how to ignore a caption and it's field in an Access 2010 Report and an Outlook Email when the field value is it is...
3
by: moonrb | last post by:
Hi, i am making A database. In this db there are many form with command buttons. Each command button executes many queries. These command buttons will not work properly if any field of the form...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...

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.