S
Shimon
I have a word docment that imports data from access. When the query is bases
on a number it wrks fine, but when I use a function in the query, word
responds with an error and cannot open the data source.
SELECT qselItem_List.*, qselItem_List.ReadyForTranslating
FROM qselItem_List
WHERE ( ((qselItem_List.SaleID)< CurrentAuctionNumber()))
ORDER BY qselItem_List.AutoNumber;
Here is the function that the query uses.
Public Const stCurrentAuctionNumber = 45
Public Static Function CurrentAuctionNumber() As Double
Static currAuctionNumber As Double
If tempCurrAuctionNumber = 0 Then
CurrentAuctionNumber = stCurrentAuctionNumber
tempCurrAuctionNumber = stCurrentAuctionNumber
Else: CurrentAuctionNumber = tempCurrAuctionNumber
End If
End Function
I would like to use this function, so that I can change the criteria from
tim to time by using the setCurrentAuctionNumber
Public Static Function SetTempAuctionNumber(dAuctionNumber)
tempCurrAuctionNumber = dAuctionNumber
End Function
Thanks for any help,
Shmon
on a number it wrks fine, but when I use a function in the query, word
responds with an error and cannot open the data source.
SELECT qselItem_List.*, qselItem_List.ReadyForTranslating
FROM qselItem_List
WHERE ( ((qselItem_List.SaleID)< CurrentAuctionNumber()))
ORDER BY qselItem_List.AutoNumber;
Here is the function that the query uses.
Public Const stCurrentAuctionNumber = 45
Public Static Function CurrentAuctionNumber() As Double
Static currAuctionNumber As Double
If tempCurrAuctionNumber = 0 Then
CurrentAuctionNumber = stCurrentAuctionNumber
tempCurrAuctionNumber = stCurrentAuctionNumber
Else: CurrentAuctionNumber = tempCurrAuctionNumber
End If
End Function
I would like to use this function, so that I can change the criteria from
tim to time by using the setCurrentAuctionNumber
Public Static Function SetTempAuctionNumber(dAuctionNumber)
tempCurrAuctionNumber = dAuctionNumber
End Function
Thanks for any help,
Shmon