A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

If field then checkbox and enable



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 10:56 PM posted to microsoft.public.access.forms
deb
external usenet poster
 
Posts: 898
Default If field then checkbox and enable



On my form called f015KeyMilestones(continuous form) I have a field called
KeyMilestonesSubID.

How can I do the following..
If KeyMilestonesSubID =12 then the checkbox called QGateNA is checked
If QGateNA is checked (user checks or the above) then the field called
PassedQGDt is enabled

Thank you
--
deb
  #2  
Old May 28th, 2010, 02:24 AM posted to microsoft.public.access.forms
Lord Kelvan
external usenet poster
 
Posts: 637
Default If field then checkbox and enable

Is QGateNA a bound control because if it isn’t then you cannot do it,
as continuous forms are a devil of a thing to do anything with.

If it is a field then again you need to check it when you create the
record that is attached to KeyMilestonesSubID. Though if you cannot
do this you will need to loop through all records in your form looking
for KeyMilestonesSubID = 12 and then set the value of the field
QgateNA to true.

As for enabling and disabling again you cannot do it as if you enable
on button on a continuous form all are enabled and the same for
disabled

What I do when I want to do this is I add some code to the button or
field that if someone selects this field or clicks this button it
tells them it cannot do it

ie

private sub PassedQGDt_gotfocus()
if QgateNA.value = false then
msgbox “you cannot use this control”
end if
end sub

Hope this helps

Regards
Kelvan
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.