Read fields before changes 
Author Message
 Read fields before changes

Hi all,

I was wondering if anyone can help me out.  Is there some VBA code that will
allow me to read values in a record field before actually going into the
record.  I would like to hide/unhide fields based on a value of a field.  I
can get it to hide/unhide on Focus, but I would like to hide/unhide before
focus.  Is there anyway I can do it, like in Form_Open?

Thanks in advance for the help.

-geoffrey



Tue, 07 Dec 2004 02:46:27 GMT  
 Read fields before changes
Geoffrey,

You'll want to use the OnCurrent event of the form.  Try something like
this:

 Me.txtField1.visible = (me.txtField1 <> "Somthing")

This way the expression will evaluate to false and thus hide the control
when the value in txtField1 equals some specified value.

Jack Doria


Quote:
> Hi all,

> I was wondering if anyone can help me out.  Is there some VBA code that
will
> allow me to read values in a record field before actually going into the
> record.  I would like to hide/unhide fields based on a value of a field.
I
> can get it to hide/unhide on Focus, but I would like to hide/unhide before
> focus.  Is there anyway I can do it, like in Form_Open?

> Thanks in advance for the help.

> -geoffrey



Tue, 07 Dec 2004 03:13:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Changing a field to Read only when form sent if it contains data

2. Reading a field and using that field to place a number in another field

3. Need help reading Outlook keyword fields into Access field

4. Read HTML formatted data from database field, Insert Wordmerge fields, and save as Word document

5. Changing the Default duration field to a custom duration field

6. HOW TO change field size and delete field

7. Name field displayed on ID field change

8. how to change field size and delete field MS ACCESS/VB

9. Change Field object to bind to another field

10. OL-Contact-Fields: Code to combine a change in the telephone-fields for to change the contents of user-defined text-fields

11. Contact-Fields: Code wanted to combine a change in the telephone-fields for to change the contents of user-defined text-fields

12. Read file name from field

 

 
Powered by phpBB® Forum Software