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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#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
|
|||
|
|||
#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
|
|||
|
|||
#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
|
|||
|
|||
#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 | |
|
|
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 |