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

Duplicating a Form and subform in MS Access 2007

P: 1
Hello;
I am in serious need of help. I have a form with subform that I am developing to fill in multiple data on customer orders. the need has come to duplicate up to 10 times the information on the Form and Subform with just the orderID changing. I tried append query with no success because my MS Access program will not recognise the [Forms]![Orders].[Tag] line as valid, so i cannot wright to the Tag property. I am now using the SQL statement

If Me.edit_subform.Form.RecordsetClone.RecordCount > 0 Then
strSql = "INSERT INTO [Order Details]([Part Number],[Part Discription],[Part Quantity],[Unit Price],[Order ID]) " & _
"SELECT " & lngID & " As NewID, [Part Number],[Part Discription],[Part Quantity],[Unit Price]" & _
"FROM [Order Details] WHERE [Order ID] = " & Me.OrderID & ";"
Debug.Print strSql

DBEngine(0)(0).Execute strSql, dbFailOnError

But I keep getting the following error

"Data Type mismatch in criteria expression"

I need help I have dumbed this down as much as possible and still cannot find the problem.

Can anyone help.
Apr 19 '11 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.