Update unbound

  • Thread starter Thread starter grubbyr
  • Start date Start date
G

grubbyr

This worked yesterday, I opened it this morning and now it
doesn't..... Is there a setting wrong?

Thanks in Advance

Private Sub Trophy_AfterUpdate()
If Check35 = True Then
Trophy.Locked = True
Trophy.Enabled = False
Trophy = Full
Else
Trophy.Locked = False
Trophy.Enabled = True
Trophy = ""

End If

End Sub
 
This worked yesterday, I opened it this morning and now it
doesn't..... Is there a setting wrong?

Thanks in Advance

Private Sub Trophy_AfterUpdate()
If Check35 = True Then
Trophy.Locked = True
Trophy.Enabled = False
Trophy = Full
Else
Trophy.Locked = False
Trophy.Enabled = True
Trophy = ""

End If

End Sub

What is Trophy = Full?

Is that supposed to be Text?
Trophy = "Full"
 
What is Trophy = Full?

Is that supposed to be Text?
Trophy = "Full"
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail- Hide quoted text -

- Show quoted text -

Trophy & Full are fields.... [Full] & [Trophy]

I want the Check box to either accept and lock the full name into the
trophy name... or allow user to edit...

Hope that helps
 
Grubb, try it like this:

Private Sub Trophy_AfterUpdate()
If Check35 = True Then
Trophy = [Full]
Trophy.Locked = True
Trophy.Enabled = False
Else
Trophy.Locked = False
Trophy.Enabled = True
Trophy = ""
End If
End Sub

UpRider
 
In addition to what the others have told you, use the Me keyword to help
Access recognize that you're talking about a control on the form. (And if
you still have problems, rename the controls so that they're different than
the fields in the recordset. I always rename my text boxes txtNameOfField.)

Private Sub Trophy_AfterUpdate()
If Me.Check35 = True Then
Me.Trophy = Me.Full
Me.Trophy.Locked = True
Me.Trophy.Enabled = False
Else
Me.Trophy = ""
Me.Trophy.Locked = False
Me.Trophy.Enabled = True
End If
End Sub

If that still doesn't work, make sure the code is actually firing (sometimes
controls and the code for their events get separated, especially if you cut
and paste the controls to move them). Check to make sure that the
AfterUpdate property for the control has [Event Procedure] in it.

(I assume you're not getting any error message, just that the actions aren't
getting carried out. If you ARE getting an error message, what is it?)
 
In addition to what the others have told you, use the Me keyword to help
Access recognize that you're talking about a control on the form. (And if
you still have problems, rename the controls so that they're different than
the fields in the recordset. I always rename my text boxes txtNameOfField.)

Private Sub Trophy_AfterUpdate()
If Me.Check35 = True Then
Me.Trophy = Me.Full
Me.Trophy.Locked = True
Me.Trophy.Enabled = False
Else
Me.Trophy = ""
Me.Trophy.Locked = False
Me.Trophy.Enabled = True
End If
End Sub

If that still doesn't work, make sure the code is actually firing (sometimes
controls and the code for their events get separated, especially if you cut
and paste the controls to move them). Check to make sure that the
AfterUpdate property for the control has [Event Procedure] in it.

(I assume you're not getting any error message, just that the actions aren't
getting carried out. If you ARE getting an error message, what is it?)

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no private e-mails, please)




This worked yesterday, I opened it this morning and now it
doesn't..... Is there a setting wrong?
Thanks in Advance
Private Sub Trophy_AfterUpdate()
If Check35 = True Then
Trophy.Locked = True
Trophy.Enabled = False
Trophy = Full
Else
Trophy.Locked = False
Trophy.Enabled = True
Trophy = ""
End Sub- Hide quoted text -

- Show quoted text -

Thanks for the help so far everyone... but no joy!
i have re written the code so many times... i have renamed fields,
txtnameoffield,lblnameoflabel and [encased]...
I am not getting any error messages and I have made sure [Event
Procedure] is in place.
I must admit it seems as though the event is not triggering... i put
Close in the code and it stayed open....
Now I am out of my league..

Any help would be greatfully accepted... Thanks
 
grubbyr said:
If that still doesn't work, make sure the code is actually firing
(sometimes
controls and the code for their events get separated, especially if you
cut
and paste the controls to move them). Check to make sure that the
AfterUpdate property for the control has [Event Procedure] in it.

(I assume you're not getting any error message, just that the actions
aren't
getting carried out. If you ARE getting an error message, what is it?)

Thanks for the help so far everyone... but no joy!
i have re written the code so many times... i have renamed fields,
txtnameoffield,lblnameoflabel and [encased]...
I am not getting any error messages and I have made sure [Event
Procedure] is in place.
I must admit it seems as though the event is not triggering... i put
Close in the code and it stayed open....
Now I am out of my league..

Put a break point in your code to see whether it actually is being triggered
(or else put a message box in the routine and see whether it appears).
 
On Sep 15, 10:18 pm, "Douglas J. Steele"
If that still doesn't work, make sure the code is actually firing
(sometimes
controls and the code for their events get separated, especially if you
cut
and paste the controls to move them). Check to make sure that the
AfterUpdate property for the control has [Event Procedure] in it.
(I assume you're not getting any error message, just that the actions
aren't
getting carried out. If you ARE getting an error message, what is it?)
Thanks for the help so far everyone... but no joy!
i have re written the code so many times... i have renamed fields,
txtnameoffield,lblnameoflabel and [encased]...
I am not getting any error messages and I have made sure [Event
Procedure] is in place.
I must admit it seems as though the event is not triggering... i put
Close in the code and it stayed open....
Now I am out of my league..

Put a break point in your code to see whether it actually is being triggered
(or else put a message box in the routine and see whether it appears).

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no private e-mails, please)- Hide quoted text -

- Show quoted text -

Thanks everyone, I found the reason....
oooooooooops
Private Sub Trophy_AfterUpdate()
If Me.Check35 = True Then
Me.Trophy = Me.Full
Me.Trophy.Locked = True
Me.Trophy.Enabled = False
Else
Me.Trophy = ""
Me.Trophy.Locked = False
Me.Trophy.Enabled = True
End If
End Sub

Should be:-
Private Sub Check35_AfterUpdate()
If Me.Check35 = True Then
etc... etc


Thanks again
 
Back
Top