Bind Form to a disconnected RecordSet Access 2000

R

Ron Weiner

Is there any way to bind an Access form to a Disconnected recordset in
AC2000, or am I stuck with using temp tables?

Ron W
 
B

Bish

Access forms are normally bound to a Record Source which
is generally a table or query. The form can also create
its own recordset which you can update like a table but
you need to be familiar with writing VBA and creating
recordsets.

If this is the case enter the form module and type
Form.Recordset then with the cursor in the word recordset
press F1. This will take you to the help file for
creating a forms recordset.

Once you have created a forms recordset you then then
update it like you would a temp table and when you are
happy with your changes then update your original table.

There are also better ways to handle this will arrays or
collections but these are only for the experienced
developer.

Evaluate exactly what you need to do with your data and
often the actual development then becomes more straight
forward.
 
R

Ron Weiner

Yea. I got all that, and I am an experienced Access Developer. What I am
trying to do is to create in InMemory (Disconnected Recordset) and bind an
Access frome (DataSheet) to it.

The Plan is to create a recordset

Set rstTempTestItems = New ADODB.Recordset ' Create new
Recordset in Mem
With rstTempTestItems
With .Fields
.Append "ItemID", adBigInt
.Append "ItemDescr", adVarChar, 50
.Append "TargetFilename", adVarChar, 255
End With
.CursorType = adOpenDynamic
.CursorLocation = adUseClient
.LockType = adLockOptimistic
.Open
End With

Then add records to the tem recordset from the Database.

rstTempTestItems.AddNew _
Array("ItemID", "ItemDescr", "TargetFilename"), _
Array(Value1, .Value2, .Value3)

Then use the recordset as the Recordset for the Form

me.recordset = rstTempTestItems

Access complains about the lack of an active connection and bails. Well
that was the whole point, binding the form to a connectionless recordset.
What I am trying to avoid is using a temp table as the object the form is
bound to as this is a multi user database that will be used in a multi user
environment (Citrix) where MANY people will be accessing the SAME front end
database. I have done this before using a temp table but, invariably this
leads to orphaned records and database bloat. I am just looking for a
better way.

Ron W
 
D

Dirk Goldgar

Ron Weiner said:
Is there any way to bind an Access form to a Disconnected recordset in
AC2000, or am I stuck with using temp tables?

I haven't attempted to do anything like this myself, but have a look at
these posts by Steve Jorgensen:


http://groups.google.com/groups?hl=...TF-8&oe=UTF-8&as_ugroup=*.*access.*&lr=&hl=en

and


http://groups.google.com/[email protected]&rnum=2

You might further search Google Groups (http://groups.google.com) for in
group *.*access.* for the keywords "Bind form to disconnected
recordset".

I note from your reply to Bish that one of your reasons for doing this
is to avoid the bloating caused by temp tables. I've handled this in
the past by creating work database on the fly in the user's Temp folder
to hold the temp table. Presto! No user conflicts and no bloating.
 

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