473,406 Members | 2,698 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,406 software developers and data experts.

Query Problem.. udating base file and unable to update it

Hi:

I have two tables, a setup table (TblSetup) and a purchase order table (tblPO).

When i construct a query with ONLY the tblPO shown, and a type in parameter for the PO
number, I an update the original tblPO. However, when I introduce the setup file into the
query I cannot update the result. THis is true if I make a link to Setup or not. In fact,
setup contains the client ID, which i wish to test against the client ID in the PO record,
and only access those POs that match. Then I want to be able to update the.

I am obviously doing something wrong but don't know what it is.

HELP!!

John Baker
Nov 12 '05 #1
4 3367
TC
Each table must have a primary key, and the tables must be joined using an
INNER/OUTER/LEFT/RIGHT JOIN construct, not just by putting their names
togetherwith a comma (TblSetup, tblPO).

So you will not really get an answer unless you tell us what is the primary
key of each table, & what SQL have you written to join them.

HTH,
TC
"John Baker" <Ba******@Verizon.net> wrote in message
news:og********************************@4ax.com...
Hi:

I have two tables, a setup table (TblSetup) and a purchase order table (tblPO).
When i construct a query with ONLY the tblPO shown, and a type in parameter for the PO number, I an update the original tblPO. However, when I introduce the setup file into the query I cannot update the result. THis is true if I make a link to Setup or not. In fact, setup contains the client ID, which i wish to test against the client ID in the PO record, and only access those POs that match. Then I want to be able to update the.
I am obviously doing something wrong but don't know what it is.

HELP!!

John Baker

Nov 12 '05 #2
TC:

These are joined using a "find" construct. The total original table appears in the query,
and the setup table now appreas in the query window, not linked ( I am using Access Query
tabes...not raw SQL), and under the appropriate field I have put the condition
([tblSetup]![Setup PO ID]). By removing ALL linkage to the setup table (leaving it free
floating) I have reached the point where the query works fine, and I can update in
DATASHEET mode from the query. However, when I construct a form using the query results I
am still unable to use it to update.
regards

John Baker

"TC" <a@b.c.d> wrote:
Each table must have a primary key, and the tables must be joined using an
INNER/OUTER/LEFT/RIGHT JOIN construct, not just by putting their names
togetherwith a comma (TblSetup, tblPO).

So you will not really get an answer unless you tell us what is the primary
key of each table, & what SQL have you written to join them.

HTH,
TC
"John Baker" <Ba******@Verizon.net> wrote in message
news:og********************************@4ax.com.. .
Hi:

I have two tables, a setup table (TblSetup) and a purchase order table

(tblPO).

When i construct a query with ONLY the tblPO shown, and a type in

parameter for the PO
number, I an update the original tblPO. However, when I introduce the

setup file into the
query I cannot update the result. THis is true if I make a link to Setup

or not. In fact,
setup contains the client ID, which i wish to test against the client ID

in the PO record,
and only access those POs that match. Then I want to be able to update

the.

I am obviously doing something wrong but don't know what it is.

HELP!!

John Baker


Nov 12 '05 #3
So you are saying that the query is updatable, but a form that is based on
the >exact same query< is not updatable?

Check the AllowAdditions, AllowEdits & Allow Deletions properties of the
form. These must be true if you want the form to be able to add, edit or
delete records, respectively. (So for example, to edit records, the query
must be updatable >and< the form's allowedits property must be true.)

HTH,
TC
"John Baker" <Ba******@Verizon.net> wrote in message
news:fe********************************@4ax.com...
TC:

These are joined using a "find" construct. The total original table appears in the query, and the setup table now appreas in the query window, not linked ( I am using Access Query tabes...not raw SQL), and under the appropriate field I have put the condition ([tblSetup]![Setup PO ID]). By removing ALL linkage to the setup table (leaving it free floating) I have reached the point where the query works fine, and I can update in DATASHEET mode from the query. However, when I construct a form using the query results I am still unable to use it to update.
regards

John Baker

"TC" <a@b.c.d> wrote:
Each table must have a primary key, and the tables must be joined using anINNER/OUTER/LEFT/RIGHT JOIN construct, not just by putting their names
togetherwith a comma (TblSetup, tblPO).

So you will not really get an answer unless you tell us what is the primarykey of each table, & what SQL have you written to join them.

HTH,
TC
"John Baker" <Ba******@Verizon.net> wrote in message
news:og********************************@4ax.com.. .
Hi:

I have two tables, a setup table (TblSetup) and a purchase order table

(tblPO).

When i construct a query with ONLY the tblPO shown, and a type in

parameter for the PO
number, I an update the original tblPO. However, when I introduce the

setup file into the
query I cannot update the result. THis is true if I make a link to
Setupor not. In fact,
setup contains the client ID, which i wish to test against the client
IDin the PO record,
and only access those POs that match. Then I want to be able to update

the.

I am obviously doing something wrong but don't know what it is.

HELP!!

John Baker

Nov 12 '05 #4
John,

I don't know if this is along the lines you are looking for but here
goes.

I have a database which imports a list of customers and their
salesreps.

Unfortunately the salesreps in Excel do not match the tblsalesreps in
the database (usually typos!). What I do is firstly run a query which
selects only the names from the spreadsheet which don't match the
names in tblsalesreps. I then base a totals query on this first query
with just one field salesrepname and select Group By. This gives me a
small recordset of the incorrect names.

I have a form whose datasource is based on the totals query. On the
form I have a textbox containing the incorrect name and an unbound
combobox which lists all of the salesreps names from tblsalesreps.

The user selects the correct spelling/name from the combobox to match
the incorrect name then presses a command button which runs an update
query. The update query changes the incorrect name to the correct
one. Once the update query has run the form datasource is requiried
and the process repeated until there are no further incorrect names.

Hopefully this is similar to your scenario. If you need to see this
in action I can email it to you, but not till Monday. Please don't
use my email address as it is constantly spammed and I only use it to
log onto Google!

David Mitchell
Nov 12 '05 #5

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

Similar topics

2
by: jaysonsch | last post by:
Hello! I am having some problems with a database query that I am trying to do. I am trying to develop a way to search a database for an entry and then edit the existing values. Upon submit, the...
13
by: Wescotte | last post by:
Here is a small sample program I wrote in PHP (running off Apache 1.3.31 w/ PHP 5.0.1) to help illustrates problem I'm having. The data base is using DB2 V5R3M0. The client is WinXP machine using...
0
by: Matt Ittigson | last post by:
I'm getting the following error(s) running perlcc and can't find any explanation or work around. I'm including the errors and the script itself. I get the same errors on a cygwin+Win2k box as a...
3
by: Nick Truscott | last post by:
<? // scoreinput.php - input a match score when match selected from list ?> <html> <head> <basefont face="Verdana"> </head> <body>
8
by: Lauren Quantrell | last post by:
In VBA, I constructed the following to update all records in tblmyTable with each records in tblmyTableTEMP having the same UniqueID: UPDATE tblMyTable RIGHT JOIN tblMyTableTEMP ON...
6
by: John Baker | last post by:
Hi: As those who have looked at this newsgroup recently will realize, I am a neophyte with Access, although I have experienced with Approach (the Lotus product). There are things I could easily...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
11
by: ZafT | last post by:
Hi all - thanks in advance for any help. I am trying to write a simple update script. In fact, I am re-using code that I've used before (successfully) but I can't figure out why it is not...
2
by: jjb1214 | last post by:
Hi all, I've been unable to find the answer I'm looking for on the forums, so I'm asking my first-ever question. I'm building a windows forms application in Visual Basic using Visual Studio 2008....
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.