473,379 Members | 1,245 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

ACCESS 97 Recordsets

I could really use some help please.

SETUP:
I have a table called "ProductTable"
I have a query called "ProductQuery" based on ProductTable
I have a form Called "ProductMF" based on ProductQuery
I have another table called TempProductTable (same as ProductTable, but
without the primary key..."ProductID")

SITUATION:
I want the user to be able to filter the ProductMF...anyway they want, then
I want a piece of code on a button to copy the filtered records from the
form into the TempProductTable.

SO FAR:
I started to do this using a recordsetclone for the form and a recordset for
the temp table. Then I realized that I would have to do this for each and
every textbox, combobox, checkbox, etc. control on the from and save it to
the appropriate field in the TempProductTable.

I was wondering if there was an easier way to save the filtered recordset of
the form into the TempProductTable?...something like an export possibly.

Thanks in advance.

Paul
Nov 13 '05 #1
1 1851
Paul wrote:
I could really use some help please.

SETUP:
I have a table called "ProductTable"
I have a query called "ProductQuery" based on ProductTable
I have a form Called "ProductMF" based on ProductQuery
I have another table called TempProductTable (same as ProductTable, but
without the primary key..."ProductID")

SITUATION:
I want the user to be able to filter the ProductMF...anyway they want, then
I want a piece of code on a button to copy the filtered records from the
form into the TempProductTable.

SO FAR:
I started to do this using a recordsetclone for the form and a recordset for
the temp table. Then I realized that I would have to do this for each and
every textbox, combobox, checkbox, etc. control on the from and save it to
the appropriate field in the TempProductTable.

I was wondering if there was an easier way to save the filtered recordset of
the form into the TempProductTable?...something like an export possibly.

Thanks in advance.

Paul


You could create an append query that appends the records to the temp
table. This query would have no filter.

Now, open up the query in SQLView. Copy and paste it into your code for
the button and assign it to a variable. Ex:

strSQL = "INSERT INTO Temp SELECT Table1.* FROM Table1 "

(the above won't work since Table1 has a key field which in your case
does not exist in Temp so you need to specifiy the fields to
append....or create a query called ProductQueryWithoutID if you have a
real long field list.)

strSQL = "INSERT INTO Temp SELECT ProductQueryWithoutID.* FROM
ProductQueryWithoutID "

Then you can do something like

strSQL = strSQL & " Where " & Me.Filter
Currentdb.Execute strSQL


Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Vikrant | last post by:
Hey friends Can someone please suggest that how many recordset can be opened simultaneously for a MS-Access 2000 Database.Does that make any difference if we use ODBC or some other way of...
64
by: John | last post by:
Hi What future does access have after the release of vs 2005/sql 2005? MS doesn't seem to have done anything major with access lately and presumably hoping that everyone migrates to vs/sql. ...
0
by: totierne | last post by:
comp.databases.ms-access, I want to know how to use Oracle views with session variables in Access. The parameterised views in access, are migrated to views with per session variables. The...
9
by: Tony Lee | last post by:
Some time a ago, on this newsgroup the following comments were made in recommending good references for Access (2003) >I used to recommend Dr. Rick Dobson's, "Programming Access <version>" for...
13
by: Greg Strong | last post by:
Hello All, Hello All, What are the ToDo's / Gotchas to convert an MDB Access 2K2 database to an Access Project (i.e. ADP) file for the front end using Microsoft SQL Server 2000 Desktop Engine...
6
by: Matthew Wells | last post by:
Can you bind ado recordsets to combo boxes and list boxes in Access 2000? thanks Matthew Wells MWells@FirstByte.net
7
by: rguarnieri | last post by:
Hi! I'm trying to create a query with a boolean expression like this: select (4 and 1) as Value from Table1 this query return always -1, but when I make the same calculation in visual...
2
by: Bob Alston | last post by:
Anyone know of any list of changes required in an Access FE to make the Access FE work with a SQL backend? ditto for Access FE working with a MYSQL backend? Bob
1
by: sphinney | last post by:
As my Access form opens, I want it to find the names of the tables in the current Access database and populate a combobox with the table (recordset) names. Problem is, the CurrentDb.Recordsets...
11
by: BeckR | last post by:
Hello - Thanks for reading my post. I am a newbie when it comes to VBA programming, but have managed to do what I need to do, until now. I have an Access 2000 database (running WinXP Pro...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.