it's not working!

it's work when i change it and that not what i want


Take this Example:

If i have records for Men and Women when i type the ID i got the 
other information for that record Include CheckBox (True for Men) 
(False for Women) 

if i change the name and the record is Related for Men i got ERROR 
MESSEGE.



--- In ms_access@yahoogroups.com, "John Viescas" <[EMAIL PROTECTED]> wrote:
> Open the form in Design view.  Open the Properties window.  Find 
the Before
> Update property for the form.  Change it to [Event Procedure] and 
click the
> Build (...) button next to the property.  That will put you in the 
VB
> Editor.  If the control containing the CheckBox is named CheckBox, 
your code
> might look like:
> 
> Private Sub Form_BeforeUpdate(Cancel As Integer)
>     If Me.CheckBox = True Then
>         MsgBox "You can't change a checked record."
>         Cancel = True
>         Me.Undo
>     End If
> End Sub
> 
> John Viescas, author
> "Building Microsoft Access Applications"
> "Microsoft Office Access 2003 Inside Out"
> "Running Microsoft Access 2000"
> "SQL Queries for Mere Mortals"
> http://www.viescas.com/
> 
> > -----Original Message-----
> > From: vip2442_access [mailto:[EMAIL PROTECTED] 
> > Sent: Thursday, March 24, 2005 5:30 PM
> > To: ms_access@yahoogroups.com
> > Subject: [ms_access] Re: Help me M.r. John Viescas
> > 
> > 
> > 
> > 
> > yew that what i want
> > how can i do that?
> > i don't know how can i write it in VB code!
> > 
> > 
> > 
> > --- In ms_access@yahoogroups.com, "John Viescas" <[EMAIL PROTECTED]> 
wrote:
> > > I'm not sure I understand your questions.  You might be able 
to 
> > put code in
> > > the BeforeUpdate event of the form to look at the CheckBox and 
> > cancel any
> > > updates.
> > > 
> > > John Viescas, author
> > > "Building Microsoft Access Applications"
> > > "Microsoft Office Access 2003 Inside Out"
> > > "Running Microsoft Access 2000"
> > > "SQL Queries for Mere Mortals"
> > > http://www.viescas.com/
> > > 
> > > > -----Original Message-----
> > > > From: vip2442_access [mailto:[EMAIL PROTECTED] 
> > > > Sent: Thursday, March 24, 2005 4:05 PM
> > > > To: ms_access@yahoogroups.com
> > > > Subject: [ms_access] Help me M.r. John Viescas
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 1- when i type the ID i will get the other data related to 
that 
> > ID.
> > > > 
> > > > 2- Befor updating the record i want to check if  the 
CheckBox is 
> > > > True so i can't update the record and get Messege.
> > > > 
> > > > such as if i change name but the CheckBox is true i get 
messege 
> > for 
> > > > that and can't update
> > > > 
> > > > else if that checkBox is false i can update.
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >  
> > > > Yahoo! Groups Links
> > > > 
> > > > 
> > > > 
> > > >  
> > > > 
> > > >
> > 
> > 
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> >





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to