Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 3066.......!!!!!

Status
Not open for further replies.

legs00

Programmer
Oct 17, 2001
36
CA
I am having a problem with me application. I am using an Docmd.outputto to output information from a table to an excel spreadsheet. I keep getting an error message:

Run-Time Error 3066:
Query must have at least one destination field.

And in my query I an trying to retrieve specific variables.


Function WBS(wbsid As String)

Dim strText As String
Dim strcheck As String
Dim strFtext As String
'wbsid = "aaa - 10h"
strText = UCase(wbsid)
strlen = Len(wbsid)

For i = 1 To strlen
strcheck = Mid(strText, i, 1)
strasc = Asc(strcheck)
Do Until strasc < 65 Or stracs > 90
If strasc > 65 Or strasc < 90 Then
strFtext = strFtext & strcheck
Else
Exit For
End If
Loop
Next i

WBS = strFtext

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top