Checking the current ADO recordset record for a value?

  • Thread starter mmcardle via AccessMonster.com
  • Start date
M

mmcardle via AccessMonster.com

Hi again,

I wonder if anyone can point me in the right direction to solve a problem?

I'm devising an application in MS Access which is using SQL Server 2000 as
the back-end and I'm retrieving the data using ADO recordsets, which are
bound to an Access datasheet.

The basic idea of my application is that the user can open a record and add
new lines to it and then edit or delete those lines, but not be able to
change any of the original lines that were part of the record. The original
lines have a field called "Edit" which is set to "N" for no. Any new lines
added are inserted with "Edit" value of "Y" for yes.

So, once the recordset is open, I want to let them change or delete the lines
with "Y" and be unable to change those with "N".

I'm trying to figure out in my head how to do this, but wondered if anyone
has tried this and what their approach was.

Many thanks,

Mark
 
S

Stefan Hoffmann

hi Mark,
I'm devising an application in MS Access which is using SQL Server 2000 as
the back-end and I'm retrieving the data using ADO recordsets, which are
bound to an Access datasheet.
You may take a look at the ADODB.Recordset WillChangeRecord(set) event.
But i'm not sure if this event is raised in your case. The docs are
unclear about it.
So, once the recordset is open, I want to let them change or delete the lines
with "Y" and be unable to change those with "N".
You may use the forms On Delete event and set Cancel to True if your
record carries the N flag.


mfG
--> stefan <--
 
M

mmcardle via AccessMonster.com

Many thanks Stefan.

I will bear your suggestions in mind as I work through it.

Regards,

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top