Unanswered: ye ole Requery and Gotorecord thing
EDIT: Found the solution in an old database of mine... using Reorcclone and Bookmark.
Since I'm having serious strenous endeavours using the search feature, I'm hoping someone can repost from an old thread, the solution of how to return to the current record after a requery.
Observe my code:
As you can see, the form in which I have to return to the current record, is a subform. For some odd reason the GotoRecord believes the form (if name is added to the gotorecord parameters) isn't open... so I'm kinda stuck here.
rek = Prod_ny!Detalje!txt_detid
verdi = Prod_ny!Detalje!txt_detid
pris = Beregnstortilskuer(verdi)
tal = Prod_ny!Detalje!txt_id
forestilling = Prod_ny!Detalje.Form.CurrentRecord
SQL = "update md_tbl_forestilling set [pris pr tilskuer] = " & Str(pris) & " where [forestilling id] = " & Str(tal)
pris = Beregnstor(verdi)
SQL = "update md_tbl_detalje set [Beregnetpris] = " & Str(pris) & " where [detaljeid] = " & Str(verdi)
DoCmd.GoToRecord acDataForm, , acGoTo, forestilling
The subform's data is a simple query with master/child link on an id.
Last edited by Trinsan; 09-13-06 at 06:54.
IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....