UtterAccess.com
Thank you for your support!      
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Subform refuses to go to a new record, Office 2003    
 
   
MrSiezen
post Jul 30 2010, 03:25 AM
Post #1

UtterAccess Ruler
Posts: 2,157
From: Den Bosch - Netherlands



Hi!

Rather frustrating problem here:
With the code of a command button below, I wan't a subform to appear with a new record in focus:

CODE
Private Sub cmdUNB_Click()

Me.subfrmNAW.Form.RecordSource = "l_calls_unbound"
Me.subfrmNAW.Form.visible = True
Me.subfrmNAW.Form.DataEntry = True
Me.unbID = DMax("ID", "l_calls_unbound")

End Sub


But it just keeps showing the first record it finds in it's recordsource. Instead of the DataEntry = True option I also tried a using sub in the subform, with: DoCmd.GoToRecord , , acNewRec.

But nothing.

For testing I added a command button on the subform, and tried both commands after the subform was 'opened'. Now both commands work as they should, moving it to a new record.

What am I missing?
Go to the top of the page
 
+
giodev
post Jul 30 2010, 11:00 AM
Post #2

UtterAccess Addict
Posts: 136
From: Torino - Italy



I would try to add a requery od the subform, like the follwing:

Me.subfrmNAW.Form.RecordSource = "l_calls_unbound"
Me.subfrmNAW.Form.visible = True
Me.subfrmNAW.Form.DataEntry = True
Me.subfrmNAW.Form.Requery
Me.unbID = DMax("ID", "l_calls_unbound")
Go to the top of the page
 
+
MrSiezen
post Aug 2 2010, 05:00 AM
Post #3

UtterAccess Ruler
Posts: 2,157
From: Den Bosch - Netherlands



Thanks for your reply giodev, but in the meanwhile I switched to a new approach (sorry, had to move along).
But now I'm facing the complete opposite problem. I'll post this problem in a new thread.
Go to the top of the page
 
+

Reply to this topicStart new topic

 



RSS Go to Top  ·  Lo-Fi Version Time is now: 4th February 2012 - 10:30 PM