3 replies
by sl-campbell
Check the EditMode property value:
Me.RecordsetClone.EditMode
Poss. Values:
DbEditInProgress
dbEditNone
dbEditAdd
If by chance the recordset is not in edit mode when the field are changed (unbound controls) then you will need to set a variable (bPossibleSave) that is set to true once any of the fields on the form are changed using the change event (could also see what the status of the text box undo is)
Another way is to set an On Error Resume Next before you try to undo.
'**************************
By the way, concerning the other question you rejected and closed because you didn't see what I was proposing to do (Select Case in an SQL statement for SQL server):
The operanden the error was refering to was the = sign as I suggested. In an SQL Server select statement with a Case the syntax is (off the top of my head):
SELECT ColumnName =
CASE
END
So in your question:
SELECT CASE column
WHEN value1 THEN valueA
WHEN value2 THEN valueB
etc....
END
Would be written as:
SELECT column =
CASE
WHEN value1 THEN valueA
WHEN value2 THEN valueB
etc....
END
SELECT
CASE
WHEN column = value1 THEN valueA
WHEN column = value2 THEN valueB
etc....
END
by shanghai sam
I eventually used the ON ERROR facility, a result perhaps of inadequate understanding of the underlying concepts of Access.
Your suggestion for CASE seems not to work, perhaps because my SELECT is subservient to INSERT. I may try the equationwithin the WHEN block. It looks cleaner than nested IIFs.
by john_wills
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending