Textbox control giving #error in a report (1 Viewer)

Jimal

Member
Local time
Today, 11:28
Joined
Sep 29, 2020
Messages
60
I have two reports for my project
im trying to place a username in the report
surprisingly the second report accepets the username and displays properly in the report, whereas the first one is giving #error.
pretty confused. appreiciate your help
1601358541177.png

1601358587769.png

1601358610979.png


whereas the second form its working properly
1601358731735.png

1601358760073.png

1601358782443.png

Appreciate your help in advance....im not a pro so please forgive my sillyness
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:58
Joined
May 7, 2009
Messages
19,231
check the Recordsource of each report.
i believe the Working report has a Query for its Recordsource.
 

Jimal

Member
Local time
Today, 11:28
Joined
Sep 29, 2020
Messages
60
Hi @arnelgp
Yes both the reports have a record source based on query.
can u mind explaining how does that impact here
 

Gasman

Enthusiastic Amateur
Local time
Today, 06:58
Joined
Sep 21, 2011
Messages
14,231
I have no idea as to why you would put an input parameter for a report. I could type any old thing as a User Name?

I would delete the one not working and copy and paste from the one working, if that is how you want to do it.
It would be best to identify the user yourself and put their ID/Name there via code?

Even try changing User to user ? Clutching at straws here. :)
 

Jimal

Member
Local time
Today, 11:28
Joined
Sep 29, 2020
Messages
60
Hi @Gasman

Idea of the input parameter is as simple as to identify who is generating the report..
I already have tried the idea of copying from the working to the not working...awfully error keeps coming

I could not understand "" It would be best to identify the user yourself and put their ID/Name there via code? "--would you mind to eloborate
thanks in advance
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:58
Joined
May 7, 2009
Messages
19,231
make Text92 Unbound by removing the "=[enter user name]".
add code to the Report's Load Event:
Code:
Private Sub Report_Load()
Me!Text92 = InputBox("Please provide your UserName:", "Username") & vbNullString
End Sub
 

Gasman

Enthusiastic Amateur
Local time
Today, 06:58
Joined
Sep 21, 2011
Messages
14,231
Hi @Gasman

Idea of the input parameter is as simple as to identify who is generating the report..
I already have tried the idea of copying from the working to the not working...awfully error keeps coming

I could not understand "" It would be best to identify the user yourself and put their ID/Name there via code? "--would you mind to eloborate
thanks in advance
I run the report, it asks for user name, I enter Jimal ???

User should really login to the DB with company userid, etc, then you store that and when you print report or whatever, you use that ID, not one I decide to key in at anytime.?
 

Users who are viewing this thread

Top Bottom