Hi
Sorry.. might not have given enough info there.... the forms employing the CNX/SQL Trans etc all have their 'x' control boxes disabled... so they have to press one of my custom Apply or Cancel buttons.
These forms are modal being opened by a call in another form. When they are applied/...
Hi
Access 2002/2007
I have a problem when closing Access. Some of my forms are based on ADBDB Rs's on which I use SQL transactions. I build a string (SQLLine) in the form-open and then add the ADODB Rs to the form. So.....
Set Edit_Cnn = CurrentProject.Connection
Edit_Cnn.BeginTrans...
OK for anyone else out there, this is how I've tackled it.
I open my RS with
Set Edit_Cnn = CurrentProject.Connection
Set Edit_rstADO = New ADODB.Recordset
With Edit_rstADO
Set .ActiveConnection = Edit_Cnn
.Source = SQLLine
.LockType = adLockOptimistic...
Hi
Hmmm.... With the connection for my RS set to :-
Set Edit_Cnn = CurrentProject.AccessConnection
The loop thru' the Rs works without missing records and re-numbers them properly....
With the connection for my RS set to:-
Set Edit_Cnn = CurrentProject.Connection
It does not. Great...
Hi - thanks for the reply.
So when (having updated 1x a list_order) I do the '.update' does the Rs get re-sorted immediately automatically by Access?
If so, I suppose I could load all the PK unique_nos into an array and then use that array in a 'find' to work thru' therecords in-sequence?
Hi NSW
Just opened my curtains to our first glimmer of frost... so I imagine NSW is starting to get even hotter?:)
I wonder if I've understood you correctly? The dots in the field names above, "TBL1.Unique_No" are not actually part of the field name but are the concatenators for table alias...
Hmm... I may have a solution....
I've added extra parameters to my FIND i.e.
, 0, adSearchForward, 1
so...
Edit_rstADO .Find "[TBL1.Unique_No]=" & Rec_No_To_Mve_To, 0, adSearchForward, 1
and it seems to be working? Fingers crossed...
Cheers
Hi
I've tried the Bookmark again but it when I try to reset it, it fails with 424 ... arguments are of wrong type, out of range or in conflict etc
Dim strBookmark As String
strBookmark = Edit_rstADO.Bookmark
Edit_rstADO.Bookmark = strBookmark
P.S.
Names and Tables:-
I've several Rs's...
Hi
Access 2007
Ye Gods does it never end?!
I loop thru' an ADO Rs to update certain fields. Before doing anything I store the ID of the Primary Key (autonum) of the current record. It is stored in a Long variable.
At the end of my loop I want to return to that record.... for which I do...
Hi
Access 2007
I've noticed an issue when looping thru' an ADODB Rs?
I build an SQLLine string based on various requirements and then open the ADODB Rs with:-
Set Edit_rstADO = New ADODB.Recordset
With Edit_rstADO
Set .ActiveConnection = Edit_Cnn
.Source = SQLLine...
Oh-Oh.... just found this...
http://support.microsoft.com/?kbid=950812
I like the way it casually mentions:-
It's not in the re-cycle bin either so short of taking my drive out and scanning it for lost files.... looks like I've got to remember every line I've changed since the last...
Hi
Looked in both of those and the MSAccess.exe folder but there's nothing obvious ... I thought it might be recorded in the recent Dbs list... but no... that was too easy....
I version control all my DBs ... actually the one in question is version 410 would you believe :) Downside is I've...
Hi
Access 2007
Just when you think you've seen it all....
I was working on a Form which would not open.. in fact it crashed Access. During the crash/recovery it created the usual backup MDB .... so
30 mins later I (whilst still having problem with a Form) decided to do a Compact and Repair...
Hi
I am sorted now thanks (see edit of my last post)...
Absolutely nothing chap! :)... In fact it's precisely what I was trying to do but didn't have the full list of acXXX... type names. I now know (thanks to your post) that they live in the help files... I've made a note in my code this...
Hi
Thanks for the info.
Actually, it's the acTypeName constants that I want to use.. Not the numerics.
I'm looping around a form and modifying control labels. During that loop I take actions based on the acTypeName and I was trying to find out what a main Tab Control is called in terms of...
Hi
Anyone know how to correlate control-type numbers to the ac-Type-Names please ?
e.g.
the ControlType of a textbox is 109...
the "actypename" is acTextbox
but what is a ControlType of 123?
I know TypeOf can help in a case statement where one already knows all the actypes but I...
Well I never.... that's how it works!
Thanks chap... all sorted now... cheers....
P.S. just in case anyone else reads this....
1. edit your query
2. add statement into a new column in the "field" row e.g.
Paid_Value: IIf(Not IsNull([Date_Payment_Received]),[Invoice_Value],0)
Here...