You can't go to the specified recordset message

G

Guest

Can anyone tell me what this means. I get this from my forms "Before Update"
procedure that checks each If statement for me which works fine. I just get
this message after. Do I need this and if not how can I get rid of it?
 
T

tina

nobody but you can see your BeforeUpdate code, so all any of us could do is
guess. how about making it easier for us, by posting the code, so we have
some idea of what it's doing - and therefore, what may be generating the
message.
 
G

Guest

I am sorry, here is a copy of the code.

If IsNull(Me.[PendingBillHrs]) And Not IsNull(Me.[PendingBill]) Then
MsgBox "You must enter the time worked on the Pending Bill"
Cancel = True
Me.[PendingBillHrs].SetFocus
Exit Sub

End If

If IsNull(Me.BillingHrs) And Not IsNull(Me.Billing) Then
MsgBox "You must enter the time worked on Billings"
Cancel = True
Me.[BillingHrs].SetFocus
Exit Sub

End If

If IsNull(Me.[PendingAsmtHrs]) And Not IsNull(Me.[PendingAsmt]) Then
MsgBox "You must enter the time worked on Pending Assessments"
Cancel = True
Me.[PendingAsmtHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[UnCertAsmtHrs]) And Not IsNull(Me.[UnCertAsmt]) Then
MsgBox "You must enter the time worked on UnCert Assessments"
Cancel = True
Me.[UnCertAsmtHrs].SetFocus
Exit Sub

End If

If IsNull(Me.[CertifiedAsmtHrs]) And Not IsNull(Me.[CertifiedAsmt]) Then
MsgBox "You must enter the time worked on Certified Assessments"
Cancel = True
Me.[CertifiedAsmtHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[PetitionsHrs]) And Not IsNull(Me.[Petitions]) Then
MsgBox "You must enter the time worked on Petitions"
Cancel = True
Me.[PetitionsHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[FinalDeterminationHrs]) And Not
IsNull(Me.[FinalDetermination]) Then
MsgBox "You must enter the time worked on Final Determinations"
Cancel = True
Me.[FinalDeterminationHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[EditHrs]) And Not IsNull(Me.[Edits]) Then
MsgBox "You must enter the time worked on Edits"
Cancel = True
Me.[EditHrs].SetFocus
Exit Sub


End If



End Sub
 
T

tina

okay, nothing in the code jumps out at me as an obvious problem.

do you see the error message only on one or more specific If statements, or
on any of them? (you'll have to enter data that "hits" each set of
conditions, to check each one individually.)
is the Update event successfully cancelled? (meaning that the record is NOT
saved.)
does your custom msgbox open?
if so, does the error message show up before or after your custom msgbox
opens?
does the focus move to the specified control?
if so, does the error message show up before or after the focus is set to
the specified control?
what is the error number that shows in the error message?

hth


Melissa said:
I am sorry, here is a copy of the code.

If IsNull(Me.[PendingBillHrs]) And Not IsNull(Me.[PendingBill]) Then
MsgBox "You must enter the time worked on the Pending Bill"
Cancel = True
Me.[PendingBillHrs].SetFocus
Exit Sub

End If

If IsNull(Me.BillingHrs) And Not IsNull(Me.Billing) Then
MsgBox "You must enter the time worked on Billings"
Cancel = True
Me.[BillingHrs].SetFocus
Exit Sub

End If

If IsNull(Me.[PendingAsmtHrs]) And Not IsNull(Me.[PendingAsmt]) Then
MsgBox "You must enter the time worked on Pending Assessments"
Cancel = True
Me.[PendingAsmtHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[UnCertAsmtHrs]) And Not IsNull(Me.[UnCertAsmt]) Then
MsgBox "You must enter the time worked on UnCert Assessments"
Cancel = True
Me.[UnCertAsmtHrs].SetFocus
Exit Sub

End If

If IsNull(Me.[CertifiedAsmtHrs]) And Not IsNull(Me.[CertifiedAsmt]) Then
MsgBox "You must enter the time worked on Certified Assessments"
Cancel = True
Me.[CertifiedAsmtHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[PetitionsHrs]) And Not IsNull(Me.[Petitions]) Then
MsgBox "You must enter the time worked on Petitions"
Cancel = True
Me.[PetitionsHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[FinalDeterminationHrs]) And Not
IsNull(Me.[FinalDetermination]) Then
MsgBox "You must enter the time worked on Final Determinations"
Cancel = True
Me.[FinalDeterminationHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[EditHrs]) And Not IsNull(Me.[Edits]) Then
MsgBox "You must enter the time worked on Edits"
Cancel = True
Me.[EditHrs].SetFocus
Exit Sub


End If



End Sub





tina said:
nobody but you can see your BeforeUpdate code, so all any of us could do is
guess. how about making it easier for us, by posting the code, so we have
some idea of what it's doing - and therefore, what may be generating the
message.


just
get
 
G

Guest

I answered all your questions below.

do you see the error message only on one or more specific If statements, or
on any of them? (you'll have to enter data that "hits" each set of
conditions, to check each one individually.)

ANSWER: I do not see this message on the first If statments but on all the
remaining ones. (I tested all of them at the same time)

is the Update event successfully cancelled? (meaning that the record is NOT
saved.)

Answer: Yes the update event is successfull.
does your custom msgbox open?

Answer: Yes my custom msgbox does open.


if so, does the error message show up before or after your custom msgbox
opens?

The error message shows up after my custom msgbox and after the focus moves
to the specified field.
does the focus move to the specified control?
if so, does the error message show up before or after the focus is set to
the specified control?
what is the error number that shows in the error message?

Answer: There is no error message number, that is what is weird. There is
just a message box that comes up and says: You can't go to the specified
record

Thanks for your help


tina said:
okay, nothing in the code jumps out at me as an obvious problem.

do you see the error message only on one or more specific If statements, or
on any of them? (you'll have to enter data that "hits" each set of
conditions, to check each one individually.)
is the Update event successfully cancelled? (meaning that the record is NOT
saved.)
does your custom msgbox open?
if so, does the error message show up before or after your custom msgbox
opens?
does the focus move to the specified control?
if so, does the error message show up before or after the focus is set to
the specified control?
what is the error number that shows in the error message?

hth


Melissa said:
I am sorry, here is a copy of the code.

If IsNull(Me.[PendingBillHrs]) And Not IsNull(Me.[PendingBill]) Then
MsgBox "You must enter the time worked on the Pending Bill"
Cancel = True
Me.[PendingBillHrs].SetFocus
Exit Sub

End If

If IsNull(Me.BillingHrs) And Not IsNull(Me.Billing) Then
MsgBox "You must enter the time worked on Billings"
Cancel = True
Me.[BillingHrs].SetFocus
Exit Sub

End If

If IsNull(Me.[PendingAsmtHrs]) And Not IsNull(Me.[PendingAsmt]) Then
MsgBox "You must enter the time worked on Pending Assessments"
Cancel = True
Me.[PendingAsmtHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[UnCertAsmtHrs]) And Not IsNull(Me.[UnCertAsmt]) Then
MsgBox "You must enter the time worked on UnCert Assessments"
Cancel = True
Me.[UnCertAsmtHrs].SetFocus
Exit Sub

End If

If IsNull(Me.[CertifiedAsmtHrs]) And Not IsNull(Me.[CertifiedAsmt]) Then
MsgBox "You must enter the time worked on Certified Assessments"
Cancel = True
Me.[CertifiedAsmtHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[PetitionsHrs]) And Not IsNull(Me.[Petitions]) Then
MsgBox "You must enter the time worked on Petitions"
Cancel = True
Me.[PetitionsHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[FinalDeterminationHrs]) And Not
IsNull(Me.[FinalDetermination]) Then
MsgBox "You must enter the time worked on Final Determinations"
Cancel = True
Me.[FinalDeterminationHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[EditHrs]) And Not IsNull(Me.[Edits]) Then
MsgBox "You must enter the time worked on Edits"
Cancel = True
Me.[EditHrs].SetFocus
Exit Sub


End If



End Sub





tina said:
nobody but you can see your BeforeUpdate code, so all any of us could do is
guess. how about making it easier for us, by posting the code, so we have
some idea of what it's doing - and therefore, what may be generating the
message.


Can anyone tell me what this means. I get this from my forms "Before
Update"
procedure that checks each If statement for me which works fine. I just
get
this message after. Do I need this and if not how can I get rid of it?
 
T

tina

my guess is that you have some code running somewhere else in the form,
perhaps in the form's Exit event, or in a control's Exit event, that is
trying to move to another record - like a "go to Next" command, or a "go to
New" command.

hth


Melissa said:
I answered all your questions below.

do you see the error message only on one or more specific If statements, or
on any of them? (you'll have to enter data that "hits" each set of
conditions, to check each one individually.)

ANSWER: I do not see this message on the first If statments but on all the
remaining ones. (I tested all of them at the same time)

is the Update event successfully cancelled? (meaning that the record is NOT
saved.)

Answer: Yes the update event is successfull.
does your custom msgbox open?

Answer: Yes my custom msgbox does open.


if so, does the error message show up before or after your custom msgbox
opens?

The error message shows up after my custom msgbox and after the focus moves
to the specified field.
does the focus move to the specified control?
if so, does the error message show up before or after the focus is set to
the specified control?
what is the error number that shows in the error message?

Answer: There is no error message number, that is what is weird. There is
just a message box that comes up and says: You can't go to the specified
record

Thanks for your help


tina said:
okay, nothing in the code jumps out at me as an obvious problem.

do you see the error message only on one or more specific If statements, or
on any of them? (you'll have to enter data that "hits" each set of
conditions, to check each one individually.)
is the Update event successfully cancelled? (meaning that the record is NOT
saved.)
does your custom msgbox open?
if so, does the error message show up before or after your custom msgbox
opens?
does the focus move to the specified control?
if so, does the error message show up before or after the focus is set to
the specified control?
what is the error number that shows in the error message?

hth


Melissa said:
I am sorry, here is a copy of the code.

If IsNull(Me.[PendingBillHrs]) And Not IsNull(Me.[PendingBill]) Then
MsgBox "You must enter the time worked on the Pending Bill"
Cancel = True
Me.[PendingBillHrs].SetFocus
Exit Sub

End If

If IsNull(Me.BillingHrs) And Not IsNull(Me.Billing) Then
MsgBox "You must enter the time worked on Billings"
Cancel = True
Me.[BillingHrs].SetFocus
Exit Sub

End If

If IsNull(Me.[PendingAsmtHrs]) And Not IsNull(Me.[PendingAsmt]) Then
MsgBox "You must enter the time worked on Pending Assessments"
Cancel = True
Me.[PendingAsmtHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[UnCertAsmtHrs]) And Not IsNull(Me.[UnCertAsmt]) Then
MsgBox "You must enter the time worked on UnCert Assessments"
Cancel = True
Me.[UnCertAsmtHrs].SetFocus
Exit Sub

End If

If IsNull(Me.[CertifiedAsmtHrs]) And Not IsNull(Me.[CertifiedAsmt]) Then
MsgBox "You must enter the time worked on Certified Assessments"
Cancel = True
Me.[CertifiedAsmtHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[PetitionsHrs]) And Not IsNull(Me.[Petitions]) Then
MsgBox "You must enter the time worked on Petitions"
Cancel = True
Me.[PetitionsHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[FinalDeterminationHrs]) And Not
IsNull(Me.[FinalDetermination]) Then
MsgBox "You must enter the time worked on Final Determinations"
Cancel = True
Me.[FinalDeterminationHrs].SetFocus
Exit Sub

End If


If IsNull(Me.[EditHrs]) And Not IsNull(Me.[Edits]) Then
MsgBox "You must enter the time worked on Edits"
Cancel = True
Me.[EditHrs].SetFocus
Exit Sub


End If



End Sub





:

nobody but you can see your BeforeUpdate code, so all any of us
could do
is
guess. how about making it easier for us, by posting the code, so we have
some idea of what it's doing - and therefore, what may be generating the
message.


Can anyone tell me what this means. I get this from my forms "Before
Update"
procedure that checks each If statement for me which works fine. I just
get
this message after. Do I need this and if not how can I get rid of it?
 
H

HKComputer

I think you are using brackets around the references to your textboxes. I
don't think that will work.

Me.[txtTextBox].Setfocus

You cannot setfocus to a field in a table. Use:

Me.txtTextBox.Setfocus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top