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

how will i know when a user modifies a record?

nev
251 100+
i have a bunch of databound controls on my form. and i have a modifiedbytextbox also. if a user changes anything in the record,

modifiedbytextbox.text = s_username.

which control & event can i place that code?

i tried placing it in...
bindingsource_currentchanged --> nope
bindingsource_currentitemchanged --> nope
bindingsource_listchanged --> nope
Jan 24 '08 #1
13 1268
debasisdas
8,127 Expert 4TB
How the user modifies a record ?
Jan 25 '08 #2
nev
251 100+
How the user modifies a record ?
thank you for replying. i know i can use the textchanged on every boundtextboxes i have on my form. but i was wondering if there is something like...

if bindingsource.isedited then
'log modified by
end if
Jan 25 '08 #3
debasisdas
8,127 Expert 4TB
It will be better to use an Edit option.

When the user clicks on edit only then they can make changes to the content and here you can set which user modified it.
Jan 25 '08 #4
nev
251 100+
thank you, i will consider that option.
Jan 25 '08 #5
Shashi Sadasivan
1,435 Expert 1GB
I think the datatable object has the method HasChanges()
which returns a bool value.
Jan 25 '08 #6
nev
251 100+
I think the datatable object has the method HasChanges()
which returns a bool value.
thank you i will look into jthat.
Jan 28 '08 #7
nev
251 100+
dataset has the haschanges() method and i tried it but did not work correctly. i cannot use the textchanged() event of each necessary control also because they are bound controls and when a user scrolls to each record, that event will be fired which will treat the record as modified even if the user only scrolled to that record. i'm still thinking to use an edit button as my last option because i don't want users to be required to click a button in order to modify a record.

what should i do and which event to use?
Jan 28 '08 #8
Shashi Sadasivan
1,435 Expert 1GB
Does not work correctly?

Could you please give an example when it does not work, maybe then you could submit a bug to microsoft then
Jan 28 '08 #9
nev
251 100+
Does not work correctly?

Could you please give an example when it does not work, maybe then you could submit a bug to microsoft then
for hascchanges to work, do i have to iterate through all the rows and check if each row haschanges? so, if i have 3,000 rows do i have to check each row 1 by 1? or can i just get all the rows that has changed then iterate through them to put the modifiedby name?
Jan 30 '08 #10
nev
251 100+
and to add, was i correct? the dataset is the only thing that has the haschanges method? i need to know please. thank you.
Jan 30 '08 #11
nev
251 100+
here is the code i used that doesn'st work. i placed this in my save button:

if dataset.haschanges() then
msgbox("boom!")
end if

i run the program and edited a field then clicked the save button. i expected the msgbox to pop but it didn't. so i concluded that it doesn't work.
Jan 30 '08 #12
nev
251 100+
is anyone here willing to help a poor soul?
Jan 30 '08 #13
nev
251 100+
ooohhh... i need to bindingsource.endedit() before checking dataset.haschanges()
Jan 30 '08 #14

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

Similar topics

9
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST ==...
7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
7
by: Mike | last post by:
I am having trouble with the new record property. When I attempt to place the code under a command button that says the following: ''''CODE STARTS HERE'''' Private Sub Cause_Entry_Click() ...
5
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp The Joy of Interoperability Sometimes a revolution in programming forces you to abandon all...
10
by: MLH | last post by:
Suppose, in a multi-user environment, you have append query SQL in a VBA procedure that looks like INSERT INTO MyTable... and the next line reads MyVar=DMax("","MyTable... You can never be...
1
by: ontherun | last post by:
Hi, I have found in one of the thread from Mccarthy, that access has the sound feature to tigger some action. Akin to my database, i want a pop-up menu with sound or something like that, to...
3
by: andy | last post by:
dear all, how to know some fields were modified by user? list bellow my project: components: DataGridView,DataSet when user change the DataGridView colmons field value,we can use...
2
rsmccli
by: rsmccli | last post by:
Access 2002 Hi, I have a number of comboboxes/textboxes in the header of a form that the user selects values from. These comboboxes/textboxes correspond to controls in a datasheet view subform....
10
by: mirandacascade | last post by:
Question toward the bottom of this post....background information immediately below. Access 97 SQL Server 2000 Please note: although the subject line uses the word 'bloat', this post is NOT...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
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
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
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
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...

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.