Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Signature associated according to UserID 2

Status
Not open for further replies.

Angelique21

Programmer
Jun 21, 2006
31
MT
Hi all, hope someone can help me with this:

I have an Order Form that once all details are filled in, the user chooses to view the Preview (REPORT) of the Order.

I have a table called USERS where it stores the USERID thus it is able to configure who is logged in the database.

When clicking to view the Preview button of the Order, I would like that a parameter query pops up, asking the user whether he wants to include a scanned signature (the aim is to be able to export the Order into a Snapshot View and send it to the client immediately with the signature (jpeg)) and if yes enters his userid. Thus only the user who is logged in must have access only to his signature.

I created another table storing the SIGNATURES of the users, thus I included the UserId and Picfile (that stores the location of the picture).

On the Order Report I included a subreport storing the signatures.

Can someone suggest a way of how to proceed.

Thanks a lot.
 
I'm not sure how the control would handle a null but I would use an IIF statment in your query to either display the signature or null depending on the value. Alternately you could have a signature query that shows only approved signatures for orders and outer join to it based on orderId.

If the query solution does not work, you could on the On Format Event of the section containing the signature set the visible property of the control to either true or false depending on what it is you are trying to do.
 
Hi, can you explain further about such point, maybe using an example of how I can go about it, cause I am still new with certain functions...

Thanks a lot
 
Can you write your query that would always display the signature and post the SQL for it?

Also how are you determining the User?


My first suggestion was to modify the query to conditionally display the signature...

Code:
SignaturePicture: IIF(Signatures.UserID = <Function Returning user>, Signatures.Picfile, Null)

Obviously replace <Function Returning user> with a function that returns the user. There ares several differnt was to accomplish managing security and I have no way of knowing which one you used.

 
How about...

A hidden unbound text box on the order form that stores the path of the signature file of the current user. (Not sure how you're determining the user, but I'm sure you know!)

A linked image object on the report that could be set to a blank signature file by default.

With the OnFormat event of the report section where the signature appears something like...
Code:
 Me.imgSignature.Picture = Forms![<frmYourOrderForm>]![<txtYourTextBoxWithTheSignaturePath>]
Where imgSignature is the name of the image object.
 
Thanks for your help both of you..

In fact I managed to create a linked image object on the report and an unbound tect box on the order, reading the current user.

thus when running the report it only shows the signature associated with the user.

However my problem is that it is giving continous signatures i.e. more than one. In addition I would like to allow the user to choose whether to show his signature or leave it blank, perhaps he wants to print it and sign directly on paper..

any suggestions please?

thanks a lot.
 
To fix the signature so there is one put it in footer section on the report. You should probably group by the order and put the signture in the order footer.

As for toggleing.. All the previous recomendations are valid, just put a checkbox on the calling form or something and reference to toggle the signature on or off. I'd be more specific but I didn't quite follow how you got it to work to this point.
 
Hey thanks for your help..It seems that everything is working fine now and I put a checkbox as you told me in the calling form for the user to choose whether to paste the signature or not.

All I need further testing now..

Thanks a lot for the suggestions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top