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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#Name in subform controls ---- KRISH



 
 
Thread Tools Display Modes
  #1  
Old April 26th, 2006, 06:23 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default #Name in subform controls ---- KRISH

Hi!
I would like to set new recordsource to my subform on changing a combobox in
the main form. My code is as below:
If Me.txtLett = "Interview" Or Me.txtLett = "Final Admn" Then
Me.Call_Letters_Sub_2.Form.RecordSource = QRYCallLettUPDTIntAdmn
ElseIf Me.txtLett = "Adv. Admn" Then
Me.Call_Letters_Sub_2.Form.RecordSource = QRYCallLettUPDTAdvAdmn
End If

I am displaying the subform in datasheet view.
The above code is showing #Name against all controls of the subform. No
problem when I open the subform separately.
Please help how to solve the problem.
Thanks
Krish
  #2  
Old April 26th, 2006, 06:31 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default #Name in subform controls ---- KRISH

You might want to just set your subform control Source Object to your query:
Me.Call_Letters_Sub_2.SourceObject = "Query.QRYCallLettUPDTIntAdmn"
--
Duane Hookom
MS Access MVP

-
"KRISH" wrote in message
...
Hi!
I would like to set new recordsource to my subform on changing a combobox
in
the main form. My code is as below:
If Me.txtLett = "Interview" Or Me.txtLett = "Final Admn" Then
Me.Call_Letters_Sub_2.Form.RecordSource = QRYCallLettUPDTIntAdmn
ElseIf Me.txtLett = "Adv. Admn" Then
Me.Call_Letters_Sub_2.Form.RecordSource = QRYCallLettUPDTAdvAdmn
End If

I am displaying the subform in datasheet view.
The above code is showing #Name against all controls of the subform. No
problem when I open the subform separately.
Please help how to solve the problem.
Thanks
Krish



  #3  
Old April 26th, 2006, 07:25 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default #Name in subform controls ---- KRISH

Sorry! its giving Application Error.

"Duane Hookom" wrote:

You might want to just set your subform control Source Object to your query:
Me.Call_Letters_Sub_2.SourceObject = "Query.QRYCallLettUPDTIntAdmn"
--
Duane Hookom
MS Access MVP

-
"KRISH" wrote in message
...
Hi!
I would like to set new recordsource to my subform on changing a combobox
in
the main form. My code is as below:
If Me.txtLett = "Interview" Or Me.txtLett = "Final Admn" Then
Me.Call_Letters_Sub_2.Form.RecordSource = QRYCallLettUPDTIntAdmn
ElseIf Me.txtLett = "Adv. Admn" Then
Me.Call_Letters_Sub_2.Form.RecordSource = QRYCallLettUPDTAdvAdmn
End If

I am displaying the subform in datasheet view.
The above code is showing #Name against all controls of the subform. No
problem when I open the subform separately.
Please help how to solve the problem.
Thanks
Krish




  #4  
Old April 27th, 2006, 04:12 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default #Name in subform controls ---- KRISH

What is the exact code that you are attempting to use?
--
Duane Hookom
MS Access MVP

"KRISH" wrote in message
...
Sorry! its giving Application Error.

"Duane Hookom" wrote:

You might want to just set your subform control Source Object to your
query:
Me.Call_Letters_Sub_2.SourceObject = "Query.QRYCallLettUPDTIntAdmn"
--
Duane Hookom
MS Access MVP

-
"KRISH" wrote in message
...
Hi!
I would like to set new recordsource to my subform on changing a
combobox
in
the main form. My code is as below:
If Me.txtLett = "Interview" Or Me.txtLett = "Final Admn" Then
Me.Call_Letters_Sub_2.Form.RecordSource = QRYCallLettUPDTIntAdmn
ElseIf Me.txtLett = "Adv. Admn" Then
Me.Call_Letters_Sub_2.Form.RecordSource =
QRYCallLettUPDTAdvAdmn
End If

I am displaying the subform in datasheet view.
The above code is showing #Name against all controls of the subform. No
problem when I open the subform separately.
Please help how to solve the problem.
Thanks
Krish






 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form, Subform, Tab key 2nd_Stage_User Using Forms 17 August 25th, 2006 12:30 AM
Accessing (!) subform controls properties at runtime AlexT Using Forms 4 November 9th, 2005 09:55 AM
Form data to automatically upldate a field in the subform Database User Using Forms 6 November 8th, 2005 09:01 PM
Changing a control's value on a subform Emmweb Using Forms 2 May 19th, 2005 04:13 PM
Design help, please SillySally Using Forms 27 March 6th, 2005 04:11 AM


All times are GMT +1. The time now is 04:58 PM.


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