If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > retrieve records on report from field on a form

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-06-02, 07:45
greystuff greystuff is offline
Registered User
 
Join Date: Nov 2002
Posts: 8
Red face retrieve records on report from field on a form

I have an ADP database linked to SQL7. I have done a lookup on a form which provides information for a client on the key field [AccountNo].
I want to open a report filtered on the [AccountNo].value that is on the form, but as I am new to ADO, I can't find an easy way to do it.
I have gone round in circles with ServerFilter, InputParameter and even trying to write a reference to the form in SQL (which doesn't work as it would in an MDB query).

I am embarrased to say that I can't figure out how to do this, and it's probably simple. (I hope).

Regards
Adrian
Reply With Quote
  #2 (permalink)  
Old 12-10-02, 07:05
greystuff greystuff is offline
Registered User
 
Join Date: Nov 2002
Posts: 8
Talking

With the help of Allen Browne MVP, the solution is at hand. It is possible to get the information by putting:-

Me.ServerFilter = (("[SomeField] = '" & [Forms]![OpenForm]![FieldIWant] & "'"))

onto the reports onopen property

Note:- The above is for values that do not contain an apostrophe. If your field may contain an apostrophe, then you will need to use a different format (See Access 2000 Developers handbook Vol 1, page 285)

Thanks again Allen.

Regards

Adrian
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On