Storing Vairables

W

williamr

I have a query that filters a record using the following code:
DoCmd.ApplyFilter , "[Vault No] = " & [Forms]![FrmReleaseOffsite]![xVaultNo]

it works but there are some other fields of info I want to capture and use
else where. I "Dim" xDeveloperName as string, then run this docmd, then say
xdeveloperName = DeveloperName. DeveloperName is the field in the query.
What's wrong!!

William
 
J

Jason Martin

Note sure if I understand but if you're setting a variable and need it to be
available for additional subs, then

Public xDeveloperName As String

Or, create a system table to hold values to use else where. Use an update
query referencing fields on your open form or if you prefer code, use DAO or
ADO to write an UPDATE SQL string for a new QueryDef and Execute.

Hope this helps.

- Jason
 
Top