| | |
what problem in this.........
![]() |
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Sub QryReport() On Error Resume Next Dim QryDef As QueryDef Dim str As String Set QryDef = dbase.QueryDefs("balancesheet") dbase.QueryDefs.Refresh If Err.Number = 3265 Then Set QryDef = dbase.CreateQueryDef("balancesheet") dbase.QueryDefs.Refresh End If str = "select * from [balancesheet]" & _ " where Date ='" & Dtpicker.Value & "'" QryDef.SQL = str datareport1.Show End Sub
I like sword. Attack or Defense.
•
•
Join Date: Jan 2008
Posts: 243
Reputation:
Solved Threads: 34
0
#2 Oct 6th, 2009
Try the following syntax -
You can also choose a specific date as in -
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
str = "SELECT * from [balancesheet] WHERE Date = DateValue(" & "'" & Dtpicker.Value & ")" & "'"
You can also choose a specific date as in -
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
str = "SELECT * from [balancesheet] WHERE Date => DateValue(" & "'" & Dtpicker.Value & ")" & "'"
Please mark questions as answered when done.
Be the ONE!!!
Be the ONE!!!
•
•
Join Date: Jan 2008
Posts: 243
Reputation:
Solved Threads: 34
0
#4 Oct 6th, 2009
•
•
•
•
str = "select * from [balancesheet] where Date ='" & Dtpicker.Value & "'"
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
str = "SELECT * from balancesheet WHERE DateOfRecord=DateValue(" & "'" & Dtpicker.Value & ")" & "'"str
Also get rid of the [] tags, it is only used when there is a space in your data table name for instance balance sheet will become [balance sheet].
hope this solves your problem.
Please mark questions as answered when done.
Be the ONE!!!
Be the ONE!!!
0
#5 Oct 7th, 2009
not work. more thing:
1. I use query (balancesheet)
2. in dataenvironment: data object - view , object name - balancesheet. in grouping tab - field used grouping - category. in Aggregates tab - name: total, function: sum, Aggregate on: grouping, Field: Amount.
here I do it, to see the sum of category. it work, I mean it show the total sum by category. but the above code i use to see the sum of category by date. I mean I select a date and the total sum will show by this date.
1. I use query (balancesheet)
2. in dataenvironment: data object - view , object name - balancesheet. in grouping tab - field used grouping - category. in Aggregates tab - name: total, function: sum, Aggregate on: grouping, Field: Amount.
here I do it, to see the sum of category. it work, I mean it show the total sum by category. but the above code i use to see the sum of category by date. I mean I select a date and the total sum will show by this date.
I like sword. Attack or Defense.
![]() |
Similar Threads
- Image upload problem (PHP)
- Problem with Windows Update and WinXP (Web Browsers)
- Installing Windows 98 On VMware. Floppy problem (Windows 95 / 98 / Me)
- Windows XP keeps restarting since a new video card (Windows NT / 2000 / XP)
- Redhat Linux 6.2 - ipop3d problem? (*nix Software)
- Problem with T720 (Cellphones, PDAs and Handheld Devices)
- Connection Problems (Networking Hardware Configuration)
- .htaccess mod_rewrite problem (Linux Servers and Apache)
- Javascript/HTML problem!!! (JavaScript / DHTML / AJAX)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: How do I display input from one from on another form?
- Next Thread: MS Word Paste then Find & Replace Macro Question
| Thread Tools | Search this Thread |
.net 3.5 2008 access ajax antivirus app asp autocomplete autosuggest botnet bullying c# c++ cellphone conficker connection count crosssitescripting cursor data database delphi derby developer development digitalbritain display dropdown editor email excel exploit gadget hacker halloween hardware hint images integration internet java kaspersky kpi linux loop malware maximum messagelabs microsoft mobile ms msdn netbeans news number office oracle patch phishing php play qt query record remote report result risk samhain sans security server sets sharepoint smartphone sms software sophos spam sql sqlinjection sqlserver sqlserver2005 survey symantec teens translate uk upload uploadatextfile vb.net vendor video view virus vista web zeroday






