Hi
The whole problem arises because the column in the RS which is being updated is also the column on which it is being sorted.... so my fault really.
Having tried all sorts of clones and bookmarks I elected to use an array of the RS's key field nos.
Dim New_List_Order As Long
Dim...
Hi
OK, OK, is it April Fool's day already?
I have an ADODB RS based form. Amongst others it has :-
1. A unique autonum column "Unique_No"
2. "Field_Selected" column
3. 'List_Order' column
4. It has a .sort of "[Field_Selected] DESC,[TBL1.List_Order]"
. (Note: TBL1. table alias is because...
Hi
I think you may be looking at the wrong property.
Right click your form and put it into design view....go to the property sheet and ensure 'form' is in the drop down box. Click the Data tab of the property sheet and you will see two properties
Order By
Order By On Load
Put your date...
Hi
No, none of the forms/subforms share a recordset as such (I didn't even know that was possible?).
The main and 1st subform (I call it the 'primary' subform) use the same SQL string but which is then used as the source for their own individual RSs.
The remaining subforms present data...
HI
There are 6 subforms at the moment, each one is ADO based and is sited on its own page of a tab control. The tab control is hosted by the main form.
Thanks
Well I've got part of it fixed... the trick was to use this combination....
me.my_subform.form.recordset.requery
set me.my_subform.form.recordset = me.my_subform.form.recordset
Without doing an unload/load of the subform (only seems to fire the current event), this correctly displays edits...
Oh... I see ...thanks for the info... it really is utterly bewildering... here's the results of some testing I've done today... I've tried to summarise the results at the bottom of the thread.
Tests - Preamble:
a) Addresses table has a 'Deleted' column - The SQL for the RS has "WHERE...
Hi
Thanks for assisting..
My form-open now leaves the Cnn and RS in place. I also have used the Dynamic cursor type (although it still reports itself as type 3)... so ...
SQLLine = "blah blah"
Set Frm_CnnADO = CurrentProject.AccessConnection
Set Frm_RstADO = New...
I'm stumped.... worked on this all day... I've tried combinations of:-
1. changing cursortypes
2. Leaving the Frm_CnnAdo / setting Frm_CnnADO to nothing (durng the open event)
3. set me.form.recordset = me.form.recordset
4. me.form.recordset.requery
5. me.form.recordset.resync
I was hoping...
Hi
Thanks for the reply (must be very early or very late down under!) ... did you mean that I should delete the line:-
Set Frm_CnnADO = Nothing ?
I'm pretty sure I took this from MSoft's example of how to use an ADODB as a form's recordset?
Hi
Thurs 16th - Cracked it partly.... plse see end of thread...
Access2007, .mdb file, local machine
I seem to be having difficulties refreshing a form's recordset. I populate the ADO based form by building an SQL string and then applying it as the source to an ADO recordset....
OnOpen...
Aha... The Stop Button? No I don't know about that... I've looked around the Debug menu but can't see such a thing... or did you mean the End button of the end/debug prompt?
cheers
Hi
Thanks... appreciate the assistance. It's taken me a while to butcher my test .mdb to get it workng long enough to perform the test..... so....
1. Open Addrs_Dtls_Form
2. Click on any record's name
3. Click the Sort button
4. Click the Cancel button on the Sort Fields form - (to confirm...
Yes... a timer does the trick... for anyone else reading ...
Declare a Boolean in the main form e.g.
Public Timer_Close_Main_Form As Boolean
Make the mainform timer public:-
Public Sub Form_Timer()
then check the boolean in the timer:-
Me.TimerInterval = 0
If...
Hi
Ran it thru' the debug... it gets to the line but doesn't close the parent form... if I leave it as
DoCmd.Close acForm, me.Form.Name, acSaveNo
It closes neither the main or subform..... The form close (X) button is active so one can close the form manually but I need to close the sub...
Hi
I'm developing the form and so it fails with different things each time..... it's just a pain having to kill and re-start Access every go and especially as Access has the habit of throwing one's (even saved) work away .... I thought there might be some obscure CNTRL key or PF key that might...
Hi
Access 2007, .mdb
I have an unlinked mainform/subform used as Modal. I have close button allowed on the mainform.
If the VB fails in my subform my error trapping includes a :-
DoCmd.Close acForm, Me.Parent.Form.Name, acSaveNo
It does not close however. None of my custom exit/cancel...
No probs chap!... I think my project would be in the [non-recycle) wheelie bin by now if it were not for the forum... It's good of people to give up so much time to help... rgds