Already Entered Value in Form but Prompting and asking me again

L

laserized

Hi all
I ve designed a Form which works properly with its report
In the form you can enter some values in the textboxes such as
UserName, ToolId or so, by that way it generates a report and prints
the report in an Excel document. which Works perfect.
Well I ve done it by writing some SQL statements in VB and by refering
the Reports RecordSource to that SQL statement. by this way report will
be generated among the criterias in the form. but There is a problem
that When I enter UserName in the form, and click the command Button it
asks the username again by prompting. But the interesting part is that,
for example when I enter Steave Fox in the userName it prompts and says

Steve Fox
________ <-- ( I write Steve Fox here again and it works )

OK



How can i prevent that?

Further info :
I pass the SQL statement by a Global variable string defined in Global
Module
and in the On Open functionality of the report it sets the SQL
statement to its RecordSource
like Me.RecordSource = strGlobalReportSQL

any helps appriciated
thanx.
metan
 
Top