Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / April 2008

Tip: Looking for answers? Try searching our database.

query not working in 2007 access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jillm - 21 Apr 2008 15:26 GMT
We switched our 2003 Access program to a 2007 Access program and are trying
to run a query to find an address or name but the search doesn't work. Only
can find the search in 2003. Seems to be a sorting issue? Is there somewhere
in 2007 that I need to click to turn on the query function?
Jerry Whittle - 21 Apr 2008 17:03 GMT
I'm confused. Are you running a query or using the Find button to search for
records? Maybe filter by form?

If using a query, please show us the SQL.  Open the query in design view.
Next go to View, SQL View and copy and past it here.
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> We switched our 2003 Access program to a 2007 Access program and are trying
> to run a query to find an address or name but the search doesn't work. Only
> can find the search in 2003. Seems to be a sorting issue? Is there somewhere
> in 2007 that I need to click to turn on the query function?
jillm - 21 Apr 2008 18:18 GMT
When I go to design view I  can't get to sql to copy anything to show you.
All we are doing is we have a database of names and addresses and trying to
do a query on "last name or street address" When we press requiery, nothing
comes up in 2007 Access program. If we use the 2003 version it will show the
query.

> I'm confused. Are you running a query or using the Find button to search for
> records? Maybe filter by form?
[quoted text clipped - 6 lines]
> > can find the search in 2003. Seems to be a sorting issue? Is there somewhere
> > in 2007 that I need to click to turn on the query function?
Jerry Whittle - 21 Apr 2008 19:38 GMT
Can't get to SQL mode? Hummmm.  Open the query in design view. Make sure that
you are on the Query Tools Design tab.

Next go up to the Office Button. Just below it should be the "Results" box.
Click on the little down triangle below the word View. Select SQL View.
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> When I go to design view I  can't get to sql to copy anything to show you.
> All we are doing is we have a database of names and addresses and trying to
[quoted text clipped - 12 lines]
> > > can find the search in 2003. Seems to be a sorting issue? Is there somewhere
> > > in 2007 that I need to click to turn on the query function?
jillm - 22 Apr 2008 15:37 GMT
Seems the only way I can get to the Query Design tab is go to "create" and
then hit query design tab and then sql view. It won't let me copy or paste
anything though so I can send it? What am I doing wrong? Thanks for your help.

> Can't get to SQL mode? Hummmm.  Open the query in design view. Make sure that
> you are on the Query Tools Design tab.
[quoted text clipped - 18 lines]
> > > > can find the search in 2003. Seems to be a sorting issue? Is there somewhere
> > > > in 2007 that I need to click to turn on the query function?
Jerry Whittle - 23 Apr 2008 13:54 GMT
Highlight the text in SQL view. Then right click on it to bring up Copy
OR do a Ctrl + c. That copy the SQL statement to the clipboard.
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> Seems the only way I can get to the Query Design tab is go to "create" and
> then hit query design tab and then sql view. It won't let me copy or paste
[quoted text clipped - 22 lines]
> > > > > can find the search in 2003. Seems to be a sorting issue? Is there somewhere
> > > > > in 2007 that I need to click to turn on the query function?
jmf - 28 Apr 2008 20:03 GMT
txtAddressLike.Value, "") <> "" Then
       filterString = _
           "UCase(CustomerServiceFormsByAddress.RequestedByAddress) LIKE
'*" & _
           UCase(Replace(Me.txtAddressLike.Value, "'", "''")) & "*'"
   End If
   If Nz(Me.txtLastNameLike.Value, "") <> "" Then
       If filterString <> "" Then
           filterString = filterString & " AND "
       End If
       filterString = filterString & _
           "UCase(CustomerServiceFormsByAddress.RequestedByLastName) LIKE
'" & _
           UCase(Replace(Me.txtLastNameLike.Value, "'", "''")) & "*'"
   End If
   Me.Form.Filter = filterString
   Me.Form.FilterOn = True
End Sub

Private Sub Form_Load()
   If Not IsNull(Me.openArgs) Then
       Dim addrFilter As String
       addrFilter = Left(Me.openArgs, InStr(Me.openArgs, Chr(9)) - 1)
       Me.txtAddressLike.Value = addrFilter
       Dim nameFilter As String
       nameFilter = Mid(Me.openArgs, InStr(Me.openArgs, Chr(9)) + 1)
       Me.txtLastNameLike.Value = nameFilter
       Me.Form.Filter = _
           "UCase(CustomerServiceFormsByAddress.RequestedByAddress) LIKE
'*" & Replace(addrFilter, "'", "''") & "*' AND " & _
           "UCase(CustomerServiceformsByAddress.RequestedByLastName) LIKE
'" & Replace(nameFilter, "'", "''") & "*'"
       Me.Form.FilterOn = True
   End If
End Sub

> Highlight the text in SQL view. Then right click on it to bring up Copy
> OR do a Ctrl + c. That copy the SQL statement to the clipboard.
[quoted text clipped - 25 lines]
> > > > > > can find the search in 2003. Seems to be a sorting issue? Is there somewhere
> > > > > > in 2007 that I need to click to turn on the query function?
Jerry Whittle - 29 Apr 2008 14:36 GMT
That's code behind the form. Not a query. I'm sorry but I'm confused now.
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> txtAddressLike.Value, "") <> "" Then
>         filterString = _
[quoted text clipped - 61 lines]
> > > > > > > can find the search in 2003. Seems to be a sorting issue? Is there somewhere
> > > > > > > in 2007 that I need to click to turn on the query function?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.