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

Update the CURRENT record with a button push ?

13
Hi

this is mad, for three days i've been scouring the web and my books on VBA, Access etc...

I have a linked table from a MS SQL server
for some reason I can't edit any data in it directly - ie, when typing into a form, i just get a locked message.
however, when i run SQL queries on it, it works fine.???!

i guess this must be some crazy SQL permissions issue?

anyway. i need to UPDATE a field called archiveFlag - this is to tell the following query which records to move to an archive table, out of the main table.

and i want to do this by having a button on each line of a Continuous Form

I'm completely stuck here - how do i write a SQL or DAO or ADO script to simply update one field on the CURRENT record - current being the one on which the button is pressed.

i'm going nuts here. my chair is uncomfortable and the radio is too loud and I can't get my DB to work!!! please help!

thanks!
Edit/Delete Message
Aug 22 '07 #1
7 4409
missinglinq
3,532 Expert 2GB
You have inadvertently posted your question in the Articles section rather than in the Forum section of our site, so I have moved it across to the Forum for you.

Welcome to TheScripts!

Linq ;0)>
Aug 22 '07 #2
NeoPa
32,556 Expert Mod 16PB
...
I have a linked table from a MS SQL server
for some reason I can't edit any data in it directly - ie, when typing into a form, i just get a locked message.
however, when i run SQL queries on it, it works fine.???!
...
  1. Is this SQL that works running on the Access database or on the SQL Server?
  2. What happens if you try editing the data directly within the linked table?
Aug 23 '07 #3
webcat
13
  1. Is this SQL that works running on the Access database or on the SQL Server?
  2. What happens if you try editing the data directly within the linked table?
hi

the sql that works is running from VBA modules within access

when i try editing data directly in the table i also get the same problem where the data is locked and i can't make any changes - i get the copy to clipboard or drop changes message box.

- other linked tables from a different DSN are working fine - so i'm kinda thinking there is a problem with that particular linked table - but i've checked using MS SQL enterprise manager and as far as i can see i have the same privs on both DBs/tables...!

i'm stuck!
Aug 23 '07 #4
NeoPa
32,556 Expert Mod 16PB
...
when i try editing data directly in the table i also get the same problem where the data is locked and i can't make any changes - i get the copy to clipboard or drop changes message box.
...
I'm not sure what "copy to clipboard or drop changes message box" means but I doubt it's important.
I've no idea why updates made via a SQL action query would work if the permissions on the table restrict updates. You are sure the SQL is not a Pass-Thru query?
The only other thing I can think of to do is to delete the link to the table and recreate it if that's not too involved a job (normally it's quite straightforward).
Aug 23 '07 #5
webcat
13
i'm convinced this is SQL permissions now, i don't know why my vb driven queries are working, but the table from one DSN is being strange, but the tables from another are working fine.

SQL permissions seem to be a complex art !


however, going back to my original post, is there a way to use DAO to allow a button push on a row to .Edit a field of the current record - ie, the one where the button is on.?

I can find lots of info on how to navigate through records with DAO like MoveFirst, MoveNext - but I can't find any way to use the Current one !!


can anyone offer a pointer?

thanks a million!
Aug 24 '07 #6
webcat
13
don't believe this


http://support.microsoft.com/kb/278696

after a week of searching this is the issue

my SQL table had BIT fields and its a known issue that Access doesn't update them!

*sigh* wasted a week, but its working now!! thanks anyway!
Aug 24 '07 #7
NeoPa
32,556 Expert Mod 16PB
Thanks for the update webcat.
I guess the error message in the link :
This record has been changed by another user since you started editing it. If you save the record, you will overwrite the changes the other user made.

Copying the changes to the clipboard will let you look at the values the other user entered, and then paste your changes back in if you decide to make changes.
is what you were referring to when you said
i get the copy to clipboard or drop changes message box.
Well - no bones were broken. I guess the important point is that it got resolved eventually.
Aug 24 '07 #8

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

Similar topics

1
by: revolnip | last post by:
As attached is the code : <% Option Explicit dim lngTimer lngTimer = Timer %> <!--#include file="Connect.asp" --> <!--#include file="Settings.asp" --> <!--#include file="Common.asp" -->
4
by: news.btinternet.com | last post by:
I have a very simple database. I have information in a form that I would like to write to a table using some code. The table is called tblTest. The field I would like to write to is called Date....
2
by: Joe Fetters via .NET 247 | last post by:
Have googled and read the VS.NET documentation can't seem to getthe answer to the following. Environment: Framework 1.1 VB.NET WinForm Access database Using all automagic tools (DataAdapter...
5
by: robecflo | last post by:
Hi Forum, i have a problem, hope somebody can give me ideas. I'm developing with windows forms and vb.net, and oracle as a database. At this moment i have a table called amortizaciones, this table...
1
by: Mark Reed | last post by:
Hi All, I'm having a problem with the following code. I've read quite a lot of old posts regarding the issue but none seem to affer a solution. The scenario is. I have a bound form which...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
3
by: laryten | last post by:
Hi, Is there a way to update the same web page instead of getting a new page each time we click the submit button? The simplest thing to do is to delete the current page (or go back to the...
9
bhcob1
by: bhcob1 | last post by:
Hey guys, 'Update or CancelUpdate without AddNew or Edit' On my database i keep occasionly get this error when i try and edit a field, it is not everytime. It will be working fine and then this...
8
by: Andi Clemens | last post by:
Hi, I want to update our DNS servers periodically with some IP addresses. But I don't know how to do this. I searched the Internet quite a while but I haven't found a good example how to do...
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
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.