Disable Buttons

R

Ryan W

I have a form with a subform on it. I used the wizard to create three cmd
buttons on the subform: cmdAddResult, cmdPreviousResult, cmdNextResult. How
can I disable these buttons based on the recordset?
 
G

Guest

hi,
the basic systax would be something like
if condition then
cmdAddResult.enabled = false
else
cmdAddresult.enabled = true
end if
but i don't know what condition would be.
 
R

Ryan W

Thank you for the reply, a little more info:

two tables: tblVisit and tblDeviceInfo, linked by visitID. (visitID is a FK
in tblDeviceInfo).

Based on the VisitID of tblvisit, there will be several enteries on the
tbldeviceinfo. How can I use my wizard created buttons so that it disables
when it is at the end, etc. ?

Thanks for your help, Ryan

hi,
the basic systax would be something like
if condition then
cmdAddResult.enabled = false
else
cmdAddresult.enabled = true
end if
but i don't know what condition would be.
 
G

Guest

hi again,
what do you mean "at the end, ect"?
are you using bound forms?
-----Original Message-----
Thank you for the reply, a little more info:

two tables: tblVisit and tblDeviceInfo, linked by visitID. (visitID is a FK
in tblDeviceInfo).

Based on the VisitID of tblvisit, there will be several enteries on the
tbldeviceinfo. How can I use my wizard created buttons so that it disables
when it is at the end, etc. ?

Thanks for your help, Ryan
 
Top