By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,398 Members | 944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,398 IT Pros & Developers. It's quick & easy.

problem making a function applicable in DAP

P: 3
I'm new to DAP, I tried to change SQL of a Query by clicking a button in DAP, but don't know how to realize it. What I can do is to change SQL of Query in module. Anybody knows how to write Script about it?

Expand|Select|Wrap|Line Numbers
  1. Function ChangeQueryDef(strQuery As String, strSQL As String) As Boolean
  2.     If strSQL = "" Or strQuery = "" Then Exit Function  
  3.     Dim qdf As QueryDef
  4.     Set qdf = CurrentDb.QueryDefs(strQuery)    
  5.     qdf.SQL = strSQL
  6.     qdf.Close
  7.     RefreshDatabaseWindow    
  8.     ChangeQueryDef = True    
  9. End Function
Aug 16 '07 #1
Share this Question
Share on Google+
1 Reply

Scott Price
Expert 100+
P: 1,384
It looks to me like you are wanting a parameterized query, which will give the end users a 'search' capability based on the parameters you let them see.

I'm adding this link here to an identical posting by the OP in the SQL Server forum:

A general rant about DAP... Microsoft has ceased supporting them with A2007. A2007 will not even open them, so it looks like MS has decided they are a dead end technology. If you have invested heavily in them, I'm sorry to hear it! However, if you aren't too far in to be able to back up, I'd suggest taking a look at other technologies to make your database accessible via the Internet.

Aug 27 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.