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

Update instead of Insert

P: n/a
I am using the following to do an INSERT if a record does not exist:

SaveMyData = "INSERT INTO clients (FirstName, LastName, Email, SSN) IN '\\
server\contacts.mdb' SELECT [Forms![client printout]![FirstName], Forms!
[client printout]![LastName], Forms![client printout]![email], Forms![client
printout]![SSN]"

I am trying to write an UPDATE to update all info if the record does exist
but I can not figure out how to do an update for a network database. Can
someone give me the syntax?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200706/1

Jun 4 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Jun 4, 11:17 am, "jbiggs via AccessMonster.com" <u33089@uwewrote:
I am using the following to do an INSERT if a record does not exist:

SaveMyData = "INSERT INTO clients (FirstName, LastName, Email, SSN) IN '\\
server\contacts.mdb' SELECT [Forms![client printout]![FirstName], Forms!
[client printout]![LastName], Forms![client printout]![email], Forms![client
printout]![SSN]"

I am trying to write an UPDATE to update all info if the record does exist
but I can not figure out how to do an update for a network database. Can
someone give me the syntax?

--
Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/2007...
UPDATE works on linked tables so a network database should be no
problem if a link to the table you want to perform the update on is
properly linked.
create the UPDATE syntax by creating a new update query in the
database window.
after you have set all the parameters, change to SQL view and copy the
sql statement to your code with DoCmd RunSQL "......"

Jun 5 '07 #2

P: n/a
On Mon, 04 Jun 2007 15:17:35 GMT, "jbiggs via AccessMonster.com"
<u33089@uwewrote:

You got the path wrong. It should be \\server\share\contacts.mdb.

Personally I never use this syntax, but rather use attached tables.

-Tom.

>I am using the following to do an INSERT if a record does not exist:

SaveMyData = "INSERT INTO clients (FirstName, LastName, Email, SSN) IN '\\
server\contacts.mdb' SELECT [Forms![client printout]![FirstName], Forms!
[client printout]![LastName], Forms![client printout]![email], Forms![client
printout]![SSN]"

I am trying to write an UPDATE to update all info if the record does exist
but I can not figure out how to do an update for a network database. Can
someone give me the syntax?
Jun 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.