By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,460 Members | 2,215 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,460 IT Pros & Developers. It's quick & easy.

subForm position and requery

P: 12
I have a subForm which has as its source a query

I would like to populate the subForm when the user exits from the last name control

Expand|Select|Wrap|Line Numbers
  1. Private Sub txtLastName_Exit(Cancel As Integer)
  2.  
  3. dim ctlLastName as control
  4.  
  5. set ctlLastName = forms.frmQuestions.sbfPreviousClient.forms.txtLastName
  6.  
  7. ctlLastName.requery
  8.  
  9. End Sub
  10.  
I am not getting any results in the subForm - is this the correct method?

Also, how can I poistion sbfPreviousClient

I have tried

Expand|Select|Wrap|Line Numbers
  1. forms.frmQuestions.sbfPreviousClient.forms.move _
  2. Left:=0, Top:=0, Width:=400, Height:=300
  3.  
  4.  
and I don't get anything.

any suggestions would be appreciated!

many tanks
/jh
Feb 27 '09 #1
Share this Question
Share on Google+
1 Reply


puppydogbuddy
Expert 100+
P: 1,923
In both cases you have the same incorrect qualifier in your syntax. Change "forms" to "form" as illustrated and see if that helps.

set ctlLastName = forms.frmQuestions.sbfPreviousClient.<<<forms>>>.t xtLastName
s/b
forms.frmQuestions.sbfPreviousClient.<<<form>>>.tx tLastName
Feb 28 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.