query an array or recordset?

charityg

Registered User.
Local time
Today, 02:21
Joined
Apr 17, 2001
Messages
634
I know this may sound a little strange, but I was wondering if I could query an array or a temporary recordset with a table. Like if my array or recordset contained the following:

9/3/2002 0
9/6/2002 0
9/12/2002 0
9/15/2002 0

and my table contained
9/6/2002 50
9/12/2002 125

I would want my result to be

9/3/2002 0
9/6/2002 50
9/12/2002 125
9/15/2002 0


This is completely wacky, but I can't store 0 valued records in my db, but I want to be able to display them for the user in case they want to change the zero value to an actual quanity. Then, only save the non-zero values back to my db.

Anyway. I'd appreciate some input.
 
If your two tables use the same date format, you could write an update query on the JOIN of those two tables.

In case you happen to not have a relationship, not to worry.

In the query gry, you can drag-'n-drop to create a TEMPORARY relationship between the corresponding date fields. Make it the type that selects only those records that are equal in the two tables.

Then update the field that contains 0 from the field in the other table (that doesn't contain 0.)
 
My main issue was that I didn't want two tables or specifically a temp table. It wasn't really an Access question per se. I'm trying to accomplish this programmatically in VB with SQL server as the db. I have since come up with a solution using disconnected recordsets and arrays. Thank you very much for your input though!!
 

Users who are viewing this thread

Back
Top Bottom