Basic learner here with question on IIF statement

TjS

Registered User.
Local time
Today, 21:37
Joined
Jul 18, 2007
Messages
126
Hi,

I have an access form which is edible for users; there is an only-read mode and a edit-mode.

I want to put a textbox in the header of the form which changes depending on the allowedit function (if allow edit is true then "edit-mode" and if allow edit is false then "read-only").

I tried something like IIF([AllowEdits];"Edit";"Read") but i think i am totally wrong? (please don't laugh at me!)

Thanks in advance for your help
 
How are you changing the form from one mode to the other?
 
Hi KenHigg,

1) on the properties of the Form, the on current i have made the property AllowEdits --> false; (not-edible)
2) i put a button on the form [edit form] with an OnClick event (message "change form", vbYes and vbNo)\
2a) on vbYes the allowedit will be true
2b) on vbNo the allowedit will be false

Maybe it is a wrong way, but it works fine so far
 
I think you just have to use something like me.allowedits:

IIF(me.AllowEdits;"Edit";"Read")

???
ken :)
 
Thanks,

Ik will try directly
(turning to other screen)....

as expression: =IIF(AllowEdits;"Edit";"Read") works....thanks for your help :)

But i have another problem, the word "Write" only seem to appear 'after' i have edited the form?!?!

hmm....go figure....?
 

Users who are viewing this thread

Back
Top Bottom