UtterAccess.com

Welcome Guest ( Log In | Register ) · View New Posts · View Unanswered Topics

 
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,101
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?


--------------------
UA Rulez!
Go to the top of the page
 
+
giodev
post Jul 30 2010, 11:00 AM
Post #2

UtterAccess Addict
Posts: 122
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")


--------------------
The computer inhumanity lies in the fact that, once programmed and started, it behaves perfectly honestly.
Go to the top of the page
 
+
MrSiezen
post Aug 2 2010, 05:00 AM
Post #3

UtterAccess Ruler
Posts: 2,101
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.


--------------------
UA Rulez!
Go to the top of the page
 
+

Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 10th September 2010 - 06:05 PM