Access 2000 problem

W

Wayne

Hi,

I have a sub form with a combo box that lists job numbers.
I have the following code in the On Got Focus event to
provide the record source of the combo box:

Private Sub ProjectID_GotFocus()
Dim strSQL As String
strSQL = "SELECT ProjectID, ProjectName " & _
"FROM Projects Query "
strSQL = strSQL & " WHERE StatusID <>5 "
Me.ProjectID.RowSource = strSQL & _
" ORDER BY 0<>val(ProjectID ), ProjectID DESC"
End Sub

This code works perfectly in Access 2002.
But in Access 2000 an error occurs when i select the combo
box field. It says that Projects Query cant be found.

Does anybody know what might be causing this problem?
 
T

TC

Try "FROM [Projects Query]".

I'm surprised that "FROM Projects Query" would work (in the way you intend)
in >any< version of Access.

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top