Changing Text Box based on Query?

Banaticus

Registered User.
Local time
Today, 08:32
Joined
Jan 23, 2006
Messages
153
The following doesn't work. How do I do some sort of query to check for something and, if it's there, do something with related information? I have the SQL queries all on one line but I'm going to break them apart for greater visibility:
Code:
Private Sub Form_Load()
IF
   (SELECT COUNT(1)
   FROM [App Info] INNER JOIN [Class Info] ON [App Info].[Soc Sec #]=[Class Info].[Soc Sec]
   WHERE [Class Info].[Class Name] alike "Qual%")
   > 0 THEN
   [Qual Class Text Box].Text =
   (SELECT [Class Info].[Class Date]
   FROM [App Info] INNER JOIN [Class Info] ON [App Info].[Soc Sec #]=[Class Info].[Soc Sec]
   WHERE [Class Info].[Class Name] alike "Qual%")
End Sub
 
Try using Dcount. You can find the syntax in help.
 

Users who are viewing this thread

Back
Top Bottom