reneford...guess I'm not sure where you're saying to pu the:
RecordSource
Type Command = adCmdText
Text Command = select * from your_table order by DepDate, UnitNo;
I tried this in a Form Load code, but it didn't work:
Private Sub Form_Load()
RecordSource
Type Command =...
reneford...In the properties of the Adodc I have SortRentDeposits as the RecordSource, which is a sort query of the Access Deposits Table. I have DepDate checked to sort ascending in the Access query, but I need the Table further sorted by the UnitNo under the dates. Something like this should...
My setup is VB6/Access2K. When loading a Form, I'm using this code:
Private Sub Command15_Click(Index As Integer)
Me.MousePointer = 11
Load DbDepForm
DbDepForm.Show
Unload Rent_Deposits_Menu
Me.MousePointer = 0
End Sub
The Form has a DataGrid1 and an Adodc1 connected to...
DrJavaJoe, I'm having trouble with the delete records.
I tried this (with no luck) to delete the records from the tblTEMP:
Private Sub Command1_Click()
Dim adoCmd As New ADODB.Command
adoCmd.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\EHicks\RESIDENTIAL PROPERTY...
DrJavaJoe....it didn't like a couple of things. I got this Compile error on the tblPERM:
Expected: end of statement
And this Compile error on the first field:
Expected: Case
Here's the code I entered:
Private Sub Command1_Click()
Insert into tblPERM (DepDate, DepNo, Tenant, etc.)...
My setup is VB6/Access2K. I need a click event on my VB Form that will append all of the Records from one Access Table (tblTEMP) to another Access Table (tblPERM)in the same Access mdb.
Can someone help me with this one?
Thanks in advance!
DrJavaJoe and other members helped me with this similar problem.
I wanted to extract all records between two dates (FromDate and To Date fields)of my DataGrid (and also my Recordset)and then print the results onto a DataGrid.
This is the code we came with:
Private Sub GetConnection()
If...
...on a datagrid named "grdList"
Private Sub FindData()
Dim SQLString As String
'Use the Search Criteria in the Query
SQLString = "SELECT * FROM SortRentDeposits WHERE DepDate BETWEEN #" & txtDateFrom.Text & "# AND #" & txtDateTo.Text & "# ORDER BY DepDate"
'Close the...
Thanks DrJavaJoe, et al for the help. I figured out why the DataReport wasn't printing.....it was "operator Error" ...copied/pasted too much in this line:
rpt.Display Me.Adodc1.rs, vbModal
It should have been:
rpt.Display rs, vbModal
The date search code and the DataReport print code works...
DrJavaJoe - I forgot to mention that I have this code on the DataReport:
Option Explicit
Private rsDataReport As ADODB.Recordset
Private Sub DataReport_Terminate()
If Not rsDataReport Is Nothing Then
If rsDataReport.State = adStateOpen Then rsDataReport.Close
End If
Set...
Wayfarin - What I do to delete any unwanted Forms, DataReports, etc. from my vbp project is to right-click the item in the Project Window and select remove. I then have to open the directory folder containing my vbp file and all of its related files and delete them from the folder. This...
PeterWallace, I believe it was DrJavaJoe that suggested this to me. Add this code to your Form Load event:
If IsDate(txtDateFrom.Text) And IsDate(txtDateTo.Text)
These are not date fields, but rather Text Boxes for entering dates. The code allowed me to display the Form containing the Text...
...to a datagrid named "grdList"
Private Sub FindData()
Dim SQLString As String
'Use the Search Criteria in the Query
SQLString = "SELECT * FROM SortRentDeposits WHERE DepDate BETWEEN #" & txtDateFrom.Text & "# AND #" & txtDateTo.Text & "# ORDER BY DepDate"
'Close the...
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.