You can compare records ... I put in red my corrections
First, Order your query by 'Year'
Dim db As Database
Dim rst As Recordset
Dim qdf As QueryDef
Dim objXL As Excel.Application
Dim objWkb As Excel.Workbook
Dim objSht As Excel.Worksheet
Dim iRow As Integer
Dim oldYear as long
Set db =...
??? don't understand ...
this works 'perfectly' on my PC
I just have forgotten the End Sub into the first code
I just can tell you to try once more, copying my first code and adding the 'End Sub'(if not already do)
Sorry
You can't define recordsource = PersonnalSummary because there no value defined for PersonnalSummary()
... I don't really understand all your code, but if this recordset is necessary, you can define the form's recordet using Form.Recordset = rsTemp.Name while the recordset is still defined...
Create a empty query named myQRY
In a module, put this code
Public Sub DynamicQuery()
Dim strQuery as String, myValue as Date
On error goto error_handler ' I let you define it
MyValue = InputBox("Date ?")
mystr = "SELECT " & format(myValue,"yyyy") &...
Hi, I put the corrections in red ... with comments
It have to work like that
Hope that helps
Sub Send()
Dim strDocName As String
Dim Message, Title, Default, MyValue
Dim strDefaultAddress As String
' Get the current documents name
strDocName = ActiveDocument.Name 'I remove your double-quotes...
You have to put this code in a Sub with the declaration ...
Public Sub SubName
Dim rst as DAO.Recordset, NewString as String, NewChar as string, i as Long
Set rst = CurrentDb.OpenRecordset("SELECT MyField FROM MyTable WHERE MyField LIKE '*\*'")
While Not rst.EOF...
1- I think it would be easier to use a combo box.
It's you to define the parameters you need like
RowSource = "SELECT [WhatYouWant] FROM YourTable"
'To display only the records in your table instead of executing your test at each time
LimitToList = True
'To display an error...
You should have your records in a table.
Supposing you have a table myTABLE with the 2 fields [Products] and [Market].
You just have to :
- parameter your first combo like that
drpPRODUCT.Rowsource = "SELECT PRODUCT FROM myTABLE"
-and add this code into the drpMARKET_Click event...
You should parameter your DropDown like that
DropDown.RowSourceType = "Table/Query"
DropDown.RowSource = "SELECT [LastName], [FirstName], [LastName] & [FirstName] as [First and Last Name] FROM myTable"
DropDown.ColumnCount = 3
DropDown.ColumnWidths = "0;0;2835"...
Hi
I think you don't need to split
You can put into your dropdown the 3 fields [FIRST NAME] - [LAST NAME] - [FIRST & LAST NAME] and only let the field [FIRST & LAST NAME] visible.
Then, you've just have to handle the values of the 2 others colums and put them into your fields
Hope that helps
SEB
And ?
I don't understand your problem ... [bat]
If you look for the good event, you should put your code into the BeforeDelConfirm event
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
Dim CSet As ADODB.Recordset
Dim strSQL
strSQL = "Exec...
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.