sorry everyone i am still not getting it:<br>
<br>
- you have a command button which contains the sql, when pressed how will i make the answer appear in a label, could you also explain it so i understand it<br>
THANKS
Example<br>
<br>
Dim rs As RecordSet<br>
Dim g_sql As String<br>
<br>
g_sql = "SELECT SUM(BEDRAG) AS VERBEDRAG FROM TABEL WHERE FAKTUURNR = " & CStr(oud_faktuurnr)<br>
Set rs = g_db.OpenRecordset(g_sql)<br>
<br>
Label.Caption = VERBEDRAG<br>
<br>
Eric<br>
<p>Eric De Decker<br><a href=mailto:vbg.be@vbgroup.nl>vbg.be@vbgroup.nl</a><br><a href=
ok... here is another way...<br>
Sub Command_Click()<br>
Dim rs as RecordSet<br>
Dim strSQL as String<br>
<br>
strSQL = "Select <field1>, <field2>,... <fieldN> from <table1>, <table2>,... <tableN> Where <Exclusion1> = "Whatever I want to filter on" and <Exclusion2> = "Where ever else I want to filter on" Group by <any of the fields>, <next field> Order by <any of the fields>, <next field> "<br>
<br>
rs.open strSQL, Active_Connection,,,adCmdText<br>
<br>
Lable.Caption = rs.feilds("<field1>".Value<br>
<br>
End Sub<br>
<br>
Just a thought...<br>
<p> Chad<br><a href=mailto:tinman@hotbot.com>tinman@hotbot.com</a><br><a href= > </a><br>Tinman,<br>
Welcome to OZ.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.