By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,701 Members | 1,970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,701 IT Pros & Developers. It's quick & easy.

no current record in form.recordset

P: n/a
Scratching my head.

I am using the filter property on a combo box .AfterUpdate event to
get to a single client record. This is causing a some strange
behavior: As I enter a subform, I get a no current record error. This
is strange to me because: I can see the record contents displayed on
the form, and debug.printing them gets me the values. Only the
form.recordset is giving me this error. form.recordset .bof and .eof
are false. ; .recordcount = 1 But when I ask for a .recordset.field
value I get "no current record"

The form worked fine when I used the recordset.findfirst method to get
to the client I want, but I was having network issues, so I wanted to
limit the number of records across the wire. -tc

May 1 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On May 1, 11:29 am, Tom Clavel <tomcla...@ouraynet.comwrote:
Scratching my head.

I am using the filter property on a combo box .AfterUpdate event to
get to a single client record. This is causing a some strange
behavior: As I enter a subform, I get a no current record error. This
is strange to me because: I can see the record contents displayed on
the form, and debug.printing them gets me the values. Only the
form.recordset is giving me this error. form.recordset .bof and .eof
are false. ; .recordcount = 1 But when I ask for a .recordset.field
value I get "no current record"

The form worked fine when I used the recordset.findfirst method to get
to the client I want, but I was having network issues, so I wanted to
limit the number of records across the wire. -tc
More: recordset.absoluteposition shows up as -1 and I can get to a
record with .movenext

May 1 '07 #2

P: n/a
This might be a timing issue (i.e. the record has not finished loading at
the moment when you try to read it.)

Or is might be that the form's Recordset is flakey, and there is a better
way to do what you want. Are you trying to see if a record is loaded? Would
testing the form's NewRecord property work? It would be at a new record if
no record loaded?

If all else fails, you could try:
Me.RecordsetClone.RecordCount
Provided it is not a timing issue, that should give you 0 (if there are no
records), or 1 (if at least one match can be loaded.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Tom Clavel" <to*******@ouraynet.comwrote in message
news:11**********************@y80g2000hsf.googlegr oups.com...
On May 1, 11:29 am, Tom Clavel <tomcla...@ouraynet.comwrote:
>Scratching my head.

I am using the filter property on a combo box .AfterUpdate event to
get to a single client record. This is causing a some strange
behavior: As I enter a subform, I get a no current record error. This
is strange to me because: I can see the record contents displayed on
the form, and debug.printing them gets me the values. Only the
form.recordset is giving me this error. form.recordset .bof and .eof
are false. ; .recordcount = 1 But when I ask for a .recordset.field
value I get "no current record"

The form worked fine when I used the recordset.findfirst method to get
to the client I want, but I was having network issues, so I wanted to
limit the number of records across the wire. -tc

More: recordset.absoluteposition shows up as -1 and I can get to a
record with .movenext
May 1 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.