Command button to copy, but NOT paste?

DeanRowe

Registered User.
Local time
Today, 23:27
Joined
Jan 26, 2007
Messages
142
Hi,

I'm using Access 2000.

I have a problem... I enter my customer’s information into a form, I then have to copy and paste it into a web-based form. It takes too long to do it while I'm on the phone so I have to get it ready before I call the customer each time. However quite often after its all entered I call my customer and they don't answer, so I've wasted the effort and will have to do it all over again later on.

I'm hoping to be able to cut down the time it takes to copy and paste so I could do it when they answer the phone over a little small talk :)

There are two things I would like to do but I can’t find any relevant information on the internet or on this site (which has been absolutely fantastic to me).

The first thing I would like to do is have a button by each field that automatically highlights and copies that field. Then I can switch to my web browser, click where I want it to go and Ctr+V to paste it in - cutting down the time it takes to highlight the field and then Ctr+C to copy it. Does anyone know the code to program a command button to do this?

The second, or alternative thing I would like to do (I think this is a case of me dreaming more than anything) is finding a way of either copying and pasting multiple fields at once, or a way of drag and dropping data from Access to a web based form. Has anyone heard of this being done?

A developer could probably integrate a payment system into access - however it would cost a small fortune and the payment software is constantly being updated so it would involve getting the developer in each time to update our system - so I've got no other option but to keep the two programs separate.

I currently use Firefox to run the web based form, however I wouldn't have any hesitation in changing over to explorer or another browser if this could be done.

Thank you for taking the time to read this post; any help would be greatly appreciated.

Thank you!
 
You can actually pass data from Access to a web page. Look up the webbrowser control to hopefull find some examples. You have to view the pages source code to retrieve the name of the controls on the page.
 
KeithG if thats correct you've made me a very happy man, it's 03.26 in the morning here and my brains more than a little cooked - I'm replying very quickly in the hope I could catch you and ask you to elaborate a little...

I've googled "webbrowser control" and "access webbrowser control" but the examples I'm finding are mainly for viewing the internet through an MS Access form, rather than an Access form communicating with a web form.

I've got four fields = "Name", "Address", "Post Code" and "Telephone Number" - which I need to pass over - do you know of any tutorials out there that explain things because I've never ventured that far into programming (I've been completely reliant upon wizards until very recently).

Any help would be fantastic KeithG - even if you don't respond, thank you, you've given me hope.
 
You can also use the following to copy text from a textbox:

DoCmd.RunCommand acCmdCopy

Here's what I do. Create a new text box on your form called txtCopy.

Then add a button to your form and add the following code to the on-click event:

Code:
me.txtCopy=me.name & vbcrlf & me.address & crlf & me.[post code] & crlf & me.[telephone number]
me.txtCopy.visible=true
me.txtCopy.setfocus
DoCmd.RunCommand acCmdCopy
me.name.setfocus
me.txtCopy.visible=false

Clicking on the button will then add all the details to the clipboard.



hth
Stopher
 

Users who are viewing this thread

Back
Top Bottom