PC Review


Reply
Thread Tools Rate Thread

Moving a bound form to a record

 
 
Fredrated
Guest
Posts: n/a
 
      21st Jan 2009
The standard way to do this is locating the record with recordsetclone, then
executing
me.bookmark = me.recordsetclone.bookmark.

Is there any other way to move a form to a specific record?

The reason I ask is, I am using Access as a front end to a postgres database
on a Unix box, connecting with ODBC. This has worked very well for years,
but with one flaw. Access will move to a selected record using the
recordsetclone technique, but only for about the first 4 requests. After
that, the code

Me.RecordsetClone.FindFirst "MasterRegistrationID = " & cstr(lngKey)

doesn't even execute, the system stays at the last record located.

If anyone knows of another way to move a form to a specific record, I would
appreciate hearing about it.

Thanks in advance for any help.

Fred

 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      21st Jan 2009
An alternate approach would be to base the form on a query that uses a
selection criterion to return a single record.

"Which record?", you ask?

Add a combobox (unbound) to the form (I prefer putting this in the header,
but whatever...). Use that combobox to display enough info to allow
selection of the record you wish displayed in the form. In the combobox's
AfterUpdate event, requery the form:
Me.Requery

The net effect of this approach is that, when you first open the form, no
record is displayed (after all, nothing's been selected in the combobox).
After the desired record is selected in the combobox, the query runs again
and returns the record, displaying it in the form.

Does that do what you want?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Fredrated" <(E-Mail Removed)> wrote in message
news:E5B0534D-FC00-4B49-95C0-(E-Mail Removed)...
> The standard way to do this is locating the record with recordsetclone,
> then
> executing
> me.bookmark = me.recordsetclone.bookmark.
>
> Is there any other way to move a form to a specific record?
>
> The reason I ask is, I am using Access as a front end to a postgres
> database
> on a Unix box, connecting with ODBC. This has worked very well for years,
> but with one flaw. Access will move to a selected record using the
> recordsetclone technique, but only for about the first 4 requests. After
> that, the code
>
> Me.RecordsetClone.FindFirst "MasterRegistrationID = " & cstr(lngKey)
>
> doesn't even execute, the system stays at the last record located.
>
> If anyone knows of another way to move a form to a specific record, I
> would
> appreciate hearing about it.
>
> Thanks in advance for any help.
>
> Fred
>



 
Reply With Quote
 
 
 
 
Fredrated
Guest
Posts: n/a
 
      21st Jan 2009
This sounds like it will do what I want. I will set this up in the next day
or so and report back on how it works.

Thanks Jeff.

Fred

"Jeff Boyce" wrote:

> An alternate approach would be to base the form on a query that uses a
> selection criterion to return a single record.
>
> "Which record?", you ask?
>
> Add a combobox (unbound) to the form (I prefer putting this in the header,
> but whatever...). Use that combobox to display enough info to allow
> selection of the record you wish displayed in the form. In the combobox's
> AfterUpdate event, requery the form:
> Me.Requery
>
> The net effect of this approach is that, when you first open the form, no
> record is displayed (after all, nothing's been selected in the combobox).
> After the desired record is selected in the combobox, the query runs again
> and returns the record, displaying it in the form.
>
> Does that do what you want?
>
> Regards
>
> Jeff Boyce
> Microsoft Office/Access MVP
>
> "Fredrated" <(E-Mail Removed)> wrote in message
> news:E5B0534D-FC00-4B49-95C0-(E-Mail Removed)...
> > The standard way to do this is locating the record with recordsetclone,
> > then
> > executing
> > me.bookmark = me.recordsetclone.bookmark.
> >
> > Is there any other way to move a form to a specific record?
> >
> > The reason I ask is, I am using Access as a front end to a postgres
> > database
> > on a Unix box, connecting with ODBC. This has worked very well for years,
> > but with one flaw. Access will move to a selected record using the
> > recordsetclone technique, but only for about the first 4 requests. After
> > that, the code
> >
> > Me.RecordsetClone.FindFirst "MasterRegistrationID = " & cstr(lngKey)
> >
> > doesn't even execute, the system stays at the last record located.
> >
> > If anyone knows of another way to move a form to a specific record, I
> > would
> > appreciate hearing about it.
> >
> > Thanks in advance for any help.
> >
> > Fred
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apartment Moving, Office Moving, Commercial Moving, Moving Companiesin your area. linkswanted Microsoft C# .NET 0 6th Jan 2008 05:46 AM
Free Moving Estimate, Local Movers, Long Distance Moving, PackingSupplies, Storage Rental, Home Moving, Apartment Moving, Office Moving,Commercial Moving linkswanted Microsoft ASP .NET 0 6th Jan 2008 05:45 AM
moving to a certain record on a bound form... Brad Pears Microsoft Access Form Coding 2 7th Apr 2006 07:06 PM
Moving to a record in a bound form Chris Strug Microsoft Access Form Coding 3 1st Nov 2005 05:26 PM
Moving to a specific record on a bound form Gerry Schatte Microsoft ADO .NET 2 16th Nov 2003 04:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:58 PM.