Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blank Fields Greyed out

Status
Not open for further replies.

aaabuhalime

Instructor
Nov 22, 2012
67
US
Hi,
I have a form created from a query, the form displays Information about Teachers, Principles and Students, I have a combobox that holds the values (Teachers, Students, Principles), When the Teacher is selected from the combo box all the teachers related info displayed and , the Not realted teacher information, or tha fields that doeasnt apply to the teahcer remains blank, same thing applies to students and principles case, my question is their a way to get those filds greyed out, for eample when I select teacher all the non applicable (fields blank) get greyed out, and when I sellect student all the blank fields that don't apply to students get greyed out and so on .......Any help on how to do that will appreciated.

Thanks
 

Dear TheAceMan1 ,
I need your help please, I am trying to open a report based on specific from values/entries, both report and form created from the same query, so basically I want when I enter the participant Id and SDate, I want the report only display for only matching record .
I tried the following two codes but the first code still it shows all records. while the second doesn't show any records ..any thoughts??

Private Sub Command108_Click()

Dim strDocName As String
Dim strWhere As String
strDocName = "rpt_Preg"
strWhere = "[ParticipantID]= """ & Me.[ParticipantID] & """ And [SDate]=#" & Me.SDate & "#"
DoCmd.OpenReport strDocName, acPreview, , strWhere

End Sub

Second Code:


Private Sub Command108_Click()
Dim strDocName As String
Dim stWhere As String
strDocName = "rpt_Preg"
strWhere = "[ParticipantID]= " & Me.[ParticipantID] & " And [SDate]=#" & Me.SDate & "#"
DoCmd.OpenReport strDocName, acPreview, , stWhere

End Sub


any help will be appreciated.

Thanks
 
aaabuhalime,
I think some of use have pointed out at least twice that you are using both stWhere and strWhere. I have suggested you use Option Explicit at the top of every module and compile your code.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top