473,385 Members | 1,396 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,385 software developers and data experts.

No Execute on Send Selected record To Another Table

21
Good Morning

I have an unbound form "FrmInterviewSuccesfful" with some unbound fields on it
There is also an option box with 3 options and by clicking on it
my subform wil filter with Sucessfull/Unsucessful and all Candiates

Works Perfectly..

In my subform i have the id some extra info about the candidate and then a tick box calles MoveToOffer.

1 or Multiple records might be selected(ticked) to be moved to TblOffer...

I then placed a command button on the frm to move all the selected records to my "offer table "

My problem, I want only the selected records to be moved, and missing something i have the following code

Expand|Select|Wrap|Line Numbers
  1. Dim iAnswer As Integer
  2.  
  3. iAnswer = MsgBox("Only selected Candiates wil be send to the Offer Table", vbCrLf & vbOK)
  4.  
  5.  
  6. DoCmd.SetWarnings (False)
  7.  
  8. currentdb.Execute "INSERT INTO tblOffer SELECT * FROM TblCandidates  " & _  " WHERE [ID] = " & Forms![frmhome]![frmContent].[Form].FrmInterviewSuccessfullsub.ID  
  9. And [SendToOffer] = -1, dbFailOnError
  10.  
  11. currentdb.Execute "DELETE * FROM TblCandidates " & _
  12. " Where [ID] = " & Forms![frmhome]![frmContent].[Form].FrmInterviewSuccessfullsub.ID  
  13. And [SendToOffer] = -1,dbFailOnError
  14.  
  15.  
  16. Forms![frmhome]![frmContent].[Form].Requery
  17.  
  18.  
DoCmd.SetWarnings Truei get my message and that is it.. not execution is happening..


I have also removed the dbfailonerro. but then get an
Runtime 438
Object does not support propery or method.


is my statement correct.. for a yes field it is -1


Can anyone possibly assist in where i might be going wrong

Thank you very much in advance
Oct 16 '08 #1
1 1386
Stewart Ross
2,545 Expert Mod 2GB
At lines 9 and 13 the 'And's are no longer part of the SQL strings you are trying to execute.

This should not even compile - it helps you in debugging to compile code first. The compiler should fail with a syntax error on these lines.

-Stewart
Oct 16 '08 #2

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

Similar topics

4
by: Jill Graham | last post by:
Hi, I'm using an access database and found following problem : I have a table X with 2 records : record 1 & record 2. I execute following procedure with 2 steps : 1. The procedure deletes...
2
by: David | last post by:
Hi, I have an order form which has a field 'ProductID'. This form has a button on each record to open a new form linked by ProductID. This new form is a continuous form and obviously, only...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
5
by: Ren | last post by:
Hello all, I have a page which can list all records from a table in my local database. For each record that is displayed there is link next to it. When the link is pressed another page opens...
2
by: shumaker | last post by:
I have a combobox that is very much like the one found in the RSS project here: http://msdn.microsoft.com/vstudio/express/visualCSharp/learning/ My projectNameComboBox basically is filled with a...
9
by: rdade22 | last post by:
Hi, I'm new so try to bare with me. I'm using access 2000 and I created a database where the user is prompted to click on a command button and the info that was put on the form is sent to a table....
3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
2
by: rn5a | last post by:
In a ASP applicatiuon, the FOrm has a textbox & a select list where the admin can select multiple options. Basically the admin has to enter the name of a new coach in the textbox & select the...
6
by: Oliver | last post by:
I'm fairly new to DB2. I have been assigned to build a delete trigger that finds the data type of each of the table's fields so that the trigger can then build a string consisting of OLD values...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.