473,469 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Append Query Syntax Question

I am writing for lack of a better word a "mini program" within a form
that does a lot of other things and is a bound form for other
purposes. The form (frmCustDetail) is bound to another table
("tblCalls")than that to which I want to write. I want to have a
button that is called "AddCalls" like below that calls an append query
that opens a new record for a "Call" being made. This table with the
calls just has a Call_ID field (the key field, which is auto-numbered)
and the name of the caller (Caller_Name). The name of the caller is
picked up from the main form within a textbox called "txtCaller_Name".

So the below is all I think I need to call the append query with my
button:

Private Sub AddCall_Click()
Dim stDocName As String
stDocName = "appendCalls"
DoCmd.OpenQuery stDocName, acNormal, acEdit
End Sub

But what is puzzling me is how to word the append query. Here's what I
have tried without it working:

INSERT INTO tblCalls ( Caller_Name )
SELECT tblCalls.Caller_Name
FROM Calls
WHERE (((Calls.Caller_Name)=[Forms]![frmCustDetail]!
[txtCaller_Name]));

Any ideas?
Thanks! Sol Shavitz

Aug 22 '07 #1
2 2420
In article <11**********************@q4g2000prc.googlegroups. com>,
so*********@yahoo.com says...
SELECT tblCalls.Caller_Name
FROM Calls

See anything wrong there?
Aug 22 '07 #2
Good catch but it still doesn't work (?)
I changed it to the below:

INSERT INTO tblCalls ( Caller_Name )
SELECT tblCalls.Caller_Name
FROM tblCalls
WHERE (((tblCalls.Caller_Name)=[Forms]![frmCustDetail]!
[txtCaller_Name]));
On Aug 22, 3:29 pm, Mike Gramelspacher <grame...@psci.netwrote:
In article <1187807925.439927.244...@q4g2000prc.googlegroups. com>,
soljshav...@yahoo.com says...SELECT tblCalls.Caller_Name
FROM Calls

See anything wrong there?

Aug 22 '07 #3

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

Similar topics

4
by: yaffa | last post by:
dear folks, i'm trying to append a semicolon to my addr string and am using the syntax below. for some reason the added on of the ; doesn't work. when i print it out later on it only shows the...
2
by: JMCN | last post by:
hi i need some advice on whether if it would be better to use an append query or an update query. here is the situation, i have linked another database table to my current database. then i...
2
by: JMCN | last post by:
hi i have a general question regarding append queries in access 97. each week i need to update my table(tblonlinereg) with new or modified records. firstly, i import the text file into my...
3
by: Larry Rekow | last post by:
As part of a macro, I'm trying to automate appending a table with new records. let's say the table 2 has some new records in it, but also has a lot of identical records to table 1. I would...
4
by: robboll | last post by:
When I try to use an append query from an oracle link it takes forever. I am exploring the idea of doing an append action using a pass-through query. If I have an Oracle ODBC connection to...
4
by: pmacdiddie | last post by:
I have an append query that needs to run every time a line item is added to a subform. The append writes to a table that is the source for a pull down box. Problem is that it takes 5 seconds to...
3
by: clarencemo | last post by:
Hello all, I have a append query that works great if I just run the query via Access. I need to convert that query into VBA code. Here is the SQL View of the query I'm trying to convert: ...
10
by: pythonnoob | last post by:
Hello everyone. New to python as well as this forum, but i must say ive learned a but already reading through some posts. Seems to be a pretty helpful community here. Before i post a question...
4
by: jcethiopia | last post by:
Hi I'm a new user with Access and I need help with some VBA syntax. I am trying to run an append query using a string SQL statement. Basically, I need to append to "tbl_All" various fields from two...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.