A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

setting focus to 3rd subform



 
 
Thread Tools Display Modes
  #21  
Old September 27th, 2007, 10:35 AM posted to microsoft.public.access
sipiaolin
external usenet poster
 
Posts: 1
Default setting focus to 3rd subform

Now I am back to the original error: 2455 'You entered an expression that
has an invalid reference to the property form/report.'

Did I do the code right? Given your bang tip, this looks correct.

Me.Reservationfrm.Form.Jobfrm.Form.Invoicefrm.Form .AllowEdits = True
Me.Reservationfrm.Form.Jobfrm.Form.Invoicefrm.Form .AllowAdditions = True
Me.Reservationfrm.SetFocus
Me.Reservationfrm.Form.Jobfrm.SetFocus
Me.Reservationfrm.Form.Jobfrm.Form.Invoicefrm.SetF ocus

Thanks again for helping me.


"Pieter Wijnen" wrote:

if you fire the sql the allowadditions will get bypassed
but you can also set
Me.Reservationfrm.Form.Jobfrm.Form.Invoicefrm.Form .AllowEdits = True
and
Me!Reservationfrm.Form.Jobfrm.Form.Invoicefrm.Form .AllowAdditions = True

HTH Pieter

Note: it is reccommended to use the . (dot) notation instead of ! (bang)
in
code, as it will at least throw an error at runtime.



"redFred" wrote in message
...
Very good! But, I don't know how to ensure that I code properly to
ensure
the new record is allowed. Help?

"Pieter Wijnen" wrote:

think we solved it there

Pieter

"redFred" wrote in message
...
Hmmmm....maybe you gave me a hint.

Jobfrm and its subform Invoicefrm are enabled and unlocked.
However --
maybe this? -- data entry is NO for Jobfrm and Invoicefrm.

This fails with 2105 "You can't go to specified record."
Me![Reservationfrm].SetFocus
Me![Reservationfrm].Form.Jobfrm.SetFocus
Me![Reservationfrm].Form.Jobfrm.Form.Invoicefrm.SetFocus

Hoping this sheds light, while I thank you for the help.











 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:30 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.