[AccessD] Recalc Parent with out loosing place in subform?

Robert Gracie Subscriptions at servicexp.com
Mon Jan 3 12:46:44 CST 2005


 Karen,
 Hmmmm. I'll give that a try..

Thanks
Robert Gracie

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Nicholson, Karen
Sent: Monday, January 03, 2005 1:16 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Recalc Parent with out loosing place in subform?

Can you follow it with a docmd.gotocontrol "fieldname" ?

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Gracie
Sent: Monday, January 03, 2005 1:08 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Recalc Parent with out loosing place in subform?


Karen,
 Thanks, I have already tried that, but book marking will only get me to a
specific record, not to the appropriate field in  the datasheet. 

Still Looking.....

Robert Gracie 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Nicholson, Karen
Sent: Monday, January 03, 2005 12:23 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Recalc Parent with out loosing place in subform?

This code might help.  I needed to do an update to the record source I was
sitting on; however, sometimes that made the record drop out of the
recordsource.  If it did not drop out of the recordsource then I want my
form to return to the record it was on before it requeried.

DoCmd.SetWarnings False
Dim mypartnumber As String
mypartnumber = Trim(Me.PartNumberAM)
DoCmd.RunSQL "UPDATE tblParts INNER JOIN tblPartsAM ON (tblParts.PartNumber
= tblPartsAM.PartNumber) AND (tblParts.TCNumber =
tblPartsAM.TCNumber) AND (tblParts.ManufacturerCode =
tblPartsAM.ManufacturerCode) SET tblPartsAM.DrawingNumber =
tblParts.DrawingNumber WHERE
(((tblParts.PartNumber)=[Forms]![frmDiscrepanciesInAMandPartsTable]![Par
tNumberAM]) AND
((tblPartsAM.ProcessedUnderTN)=[Forms]![frmDiscrepanciesInAMandPartsTabl
e]![ProcessedUnderTN]));"
Me.Requery
If IsNull(DLookup("tblpartsam.PartNumber",
"qryDifferencesInAMandDatabase", "([tblPartsAM].[PartNumber]) = " & "'"
& [mypartnumber] & "'")) Then
MsgBox "Record Now Matches Parts Database", , "Record Matches"
Exit Sub
End If
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "([tblPartsAM].[PartNumber]) = " & "'" & [mypartnumber] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark DoCmd.SetWarnings True

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Gracie
Sent: Monday, January 03, 2005 12:16 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Recalc Parent with out loosing place in subform?


 
 Hello,
 This seems so silly, but I can't figure out how to cause the parent form
(from with in the subform) to recalc WITH OUT causing the subform to
requery, and move the cursor back to the top record.

 Any ideas?? Or is this not possible??

Robert Gracie

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list