Modules & VBA :: Place Image File Into ClipBoard

May 18, 2014

I would like to place an image file located at e.g. "C:MyImagesimage.png" into the clipboard. I have not been able to figure out how to do this. I have been able to place Text into the Clipboard using the DataObject late binding sub below.

Code:
Public Sub PutInClipBoard(strString As String)
Const DATAOBJECT_BINDING As String = "new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}"
With CreateObject(DATAOBJECT_BINDING)
.SetText strString
.PutInClipBoard
End With
End Sub

View Replies


ADVERTISEMENT

Modules & VBA :: Browse For File Name And Place As String In Text Box?

Mar 10, 2014

I have created a form to send emails with attachments. The attachment path is specified in an unbound field which I have called [ToAttach] Rather than typing in the path, I want to use the browse function. I have inserted a browse button and can browse for the required file using following, but can't figure out how to place the file name in the unbound field as a string.

Code:
Dim f As Object
Set f = Application.FileDialog(3)
f.AllowMultiSelect = False
f.Show

View 7 Replies View Related

Is It Possible To Place An Animated Gif Image On My Form?

Sep 21, 2006

No? Yes? If, so how?

View 2 Replies View Related

Modules & VBA :: Migrating Contents Of A Table - Export BMP Image To A File

Apr 24, 2014

I need to migrate the contents of a table from Access Jet or Ace to SQL Server.

The table has 2 fields, an integer and a BMP image ex

Field1 Field2
1 BMPimage
2 BMPimage
3 BMPimage
4 BMPimage

If I manage to export the images to files like 1.bmp, 2.bmp, 3.bmp, 4.bmp etc I can then import them into SQL Server.

View 6 Replies View Related

Modules & VBA :: Encrypt / Decrypt JPEG Image / Binary File

Oct 7, 2014

I am looking for a function that will allow me to encrypt/decrypt single image files as and when required. I have built my own simple one to encrypt a string that will be stored in a filename as all the ones I found created unusable filenames.

However I don't know where to start with the image file encryption.

(Any better way to encrypt a string that can be used in a file name that would be great too. My method is a bit basic).

View 2 Replies View Related

Modules & VBA :: Create Image File From HTTP Request Response Body?

Oct 24, 2014

I'm working on a database which is designed to connect to an app called Canvas (www dot gocanvas dot com). It's for a client which runs a team of heating engineers. All the information regarding the engineer's job is uploaded to Canvas through their API as an XML file, and the engineers use an app on tablet to view the job details. When the engineer goes to their customer and does some work, the completed info (which parts were serviced etc) is then downloaded as an XML file via the API into the database. Also, the customer signs on the engineer's tablet to confirm that the work has been done.

Although the XML files for the job data upload and download fine, there's a different API for getting a download of the JPEG which contains the customer signature, and I'm having real problems finding out how to use this.

The API guide says this:
----
The Submissions API is restricted to authenticated users and requires a username and apassword to access. In addition, the ID field is required. If these fields aren't specified, an error is returned.

The result of this webservice invocation will be either a standard JPEG image or an error code.

Example: [URL] ....

All my code (which I've pasted at the foot of this message seems to work fine. There are no errors, and the ResponseBody object appears to contain a byte stream which would be the jpeg... if only I could get it into a jpeg file!

How I go about taking this "stuff" that's come back in the responsebody and actually create a jpeg image file from it? I feel that I'm so close that I can smell it, but can't get the last step!

Here's the existing code :

Code:
Sub DownloadImageFile()
Dim xhr As Object
Dim webServiceURL As String
Dim actionType As String
Dim PostData As String
Dim strResult As String

[Code] ....

View 7 Replies View Related

Modules & VBA :: Changing Image Path - Set Picture Property Of Image

Dec 4, 2014

I have a form that I would like to update a picture on using VBA. The source of the picture path is in part a query that is not bound to the form. So far I have the following code that is pretty much working, but with a couple flaws.

Code:
Private Sub Form_Current()
LoadDefaultPicture
End Sub
Sub LoadDefaultPicture()
Dim db As DAO.Database

[Code] ....

This is working. However, when I change the record the picture flashes the current picture once and then loads the new picture. It is like it reloads the current picture then loads the new one. I'm hoping there is a way to get rid of the flash.

Also, the code fails here:
strDefaultPictureName = rs.Fields("AttachmentName")

When the query does not return a record. I can definitely fix this by adding an if statement to check for a record, but I'm kind of perplexed at why it is failing at that line. I would expect it to assign an empty string to that variable name and then fail on the next command where I try and set the ".Picture" property of the image.

View 8 Replies View Related

Modules & VBA :: Copy Results Of Query Without Headings To Clipboard

May 19, 2014

I found the following code to copy the results of a query to the clipboard.

Code:
DoCmd.OpenQuery "DataLoadTemp_qry", acViewNormal, acEdit
DoCmd.SelectObject acQuery, "DataLoadTemp_qry"
DoCmd.RunCommand acCmdSelectAllRecords
RunCommand acCmdCopy
DoCmd.Close acQuery, "DataLoadTemp_qry", acSaveNo

It works great, except that it is also copying the column headings. Is there any way to copy only the results without the headings?

I'm copying this data to the clipboard because I want to be able to paste it in a program called DataLoad which will load this data into one of our company's legacy systems.

View 1 Replies View Related

Modules & VBA :: Copy Outcome Of Query Results To Clipboard

Jul 8, 2013

I'm trying to copy the outcome of a query to the clipboard. as follows

DoCmd.OpenQuery "changeboard query", acViewNormal, acEdit
DoCmd.SelectObject acQuery, "CHANGEBOARD QUERY"
RunCommand acCmdCopy
DoCmd.Close acQuery, "Changeboard query", acSaveNo

It doesn't work because in the open query there is nothing selected.

If I select the lines by hand the copy command works fine.

However I can't find the command in VBA to select all the lines in the query.

View 1 Replies View Related

Modules & VBA :: Joining 2 Text Boxes And Copying To Clipboard

Jun 24, 2014

I would like to be able to join 2 text boxes and then copy them to clipboard. My initial fumbling has had me to joing the 2 text boxes as a string and then set that string as the value of another hidden text box and then copy that text box.

strOut = Me.Title & Me.Description
Me.CopyTxt.Visible = True
Me.CopyTxt.Value = strOut
Me.CopyTxt.SetFocus
DoCmd.RunCommand acCmdCopy
Me.Title.SetFocus
Me.CopyTxt.Visible = False

This does work but I would like to format the output if possible to remove the element identifiers? The string copies out as below.

Title Information<div>Description Information</div>

Is it possible to remove the <div> and any other elements that may appear either using my method or another way. Not sure if they are appearing as the Title box is plain text and the description is Rich?

View 4 Replies View Related

Modules & VBA :: Copy From Excel And Paste Directly To Access From Clipboard

May 28, 2015

I am copying a range from excel (multiple rows) and paste it directly to access table using:

Code : DoCmd.RunCommand acCmdPasteAppend

Sometimes it does not work and I need to use paste special as text.

Is there any way to paste special as text using VBA ?

View 3 Replies View Related

Output An OLE Image To A File

Mar 31, 2008

Hello, all.

I haven't worked with access in about 2 years, so I'm a bit rusty. I was wondering, what is the easiest way, if any, to output an image stored in an OLE object field to a file, like a bmp to be edited say in paint or something via VB code?

View 3 Replies View Related

Control To Browse For An Image File

Aug 18, 2005

Hi,

I'm trying to add a control to my form that I don't know how to do.


On my form, I want the user to be able to click a button which will open up the standard file open dialog box. The user then will be able to browse through the appropriate directory and select an image file which will be saved on that specific record.

Attached is a strip down database as an example.

How can I do this? Any help would be greatly appreciated - I'm trying to do this for my work.

View 6 Replies View Related

Modules & VBA :: Place Heading In First Or Second Row In Word Doc

Sep 30, 2013

I have below vba code in a sub that opens word application and generates the data from a table based on criteria provided thru a form.

These lines are smoothly working..

But I need to place some headings in first line or second line of the document and then to start the table information to appear in the doc.

I tried to place my company name below way (see bold lines);

Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim I As Integer

Set db = CurrentDb()
Set rs = db.OpenRecordset("SELECT * FROM T_CustomerMaster WHERE SALESMANCODE='" & Forms!F_ReportMaster!TxtRepCode & "' order by custcode;")

WordSetup

doc.Tables.Add Range:=doc.Range, numrows:=1, numcolumns:=5
'Trying to place main heading
'doc.Range(1, 0).Text = "fsdafds"

[Code] ....

But the table starting from column 1 and cell 1 till data ends up.

Finally I converted my trial lines to remark as it is not working at all.

View 8 Replies View Related

Converting Image Stored In Table To .jepg File

Aug 17, 2007

I am creating a employee db where the pic of the employee is displayed. The pic of the employee is currently stored in a folder using the employee ID as the file name, and the link to the pic file is stored in the employee table. The pic is displayed via an "on current" event of the employee form. I would like to be able to aquire a pic directly from a digital camera into the folder and have it available for the employee display form. I am not sure how to do it as the link to the pic file must be automatically stored in the employee table associating it with the employee info.

At present, I am thinking of capturing the pic from the digital camera into a Temptable in the db and converting the image in the Temptable into a jepg file in the pic folder with the employee id as its file name. If I can do this, I am pretty much home free. Can someone please help. If not the method above, please directly me to another. Thanks

View 5 Replies View Related

Modules & VBA :: Place If Statement In AfterUpdate Event On Form

Nov 13, 2014

I'm trying to place an if statement in an afterupdate event on a form. The code I have is

Code:
If [Customer] Like "BRO001" And [Inv No] is null Then [Job_Price] = [Shots] * 27.5

this gives me a run time error, object required and highlights

Code:
If [Customer] Like "BRO001" And [Inv No] Is Null Then

I'd like the code to do nothing where the requirements to alter the job price are not met.

View 5 Replies View Related

Modules & VBA :: Losing Decimal Place In Mail Merge

Sep 4, 2013

My DB is merge in a currency field set to 2 decimal places into word. It's doing this by declaring the fields as variable, calling an instance of work then dropping the values into the bookmarks. All works fine....

When a value is 360.64 is fine, but when it's something that ends with a 0 (360.60) - is loses the 0 giving me 360.6.

View 2 Replies View Related

Modules & VBA :: Access Calendar Icon Appears All Over The Place?

Sep 14, 2013

I have migrated an A2003 application to A2013 and in one of the A2013 forms I get a calendar icon appear all ove the place.

I uploaded a short video at

[URL]

When the form opens (shows dentist appointments by chair) the icon appears that the very top in Chair 1. I can add a patient, no problem.

When I click on an appointment in Chair 2, the icon appears in the last clicked appointment on Chair 1. When I then click on Chair 1 the icon appears on the last clicked appointment on Chair 2.There is no problem with the A2003 version. I DO NOT use the Calendar icon in my application or any third party software.

View 2 Replies View Related

Modules & VBA :: Where To Place Code That Run Constantly Without Event Such As A Click

May 26, 2015

I'm currently trying to make the call answering screens a bit better in the call centre that i work in. i'm trying to make a caller i.d. for incoming calls. i have a reference library from the telephone software people in vba that lets me dial and hangup the phone, now i'm trying to place a text box on the form that will update to show the number of an incoming call which will enable me to search a table of contacts and display the details of the caller if they are available. i'm guessing that i need to create a loop that will run until there is an incoming call but i don't know where to place the code without it needing a mouse click or mouse over to trigger it. i just want it to run constantly.

View 5 Replies View Related

Forms :: Show Image / Text / Xlsx File In Continuous Subform

Jul 12, 2015

I want to show an subform where in I would like to display images,txt,xlsx that are stored in a directory as icons which when clciked would open the respective files.The info related to the images are stored in t_CustomerFiles.

Record ID, CustomerID, DestinationPath,EventFileName,
1, A, C:UsersTestDesktopCustFiles, CustA1.jpg
2, A, C:UsersTestDesktopCustFiles, CustA2.xlsx
3, B, C:UsersTestDesktopCustFiles, CustB1.txt
4, C, C:UsersTestDesktopCustFiles, CustC1.jpg
5, C, C:UsersTestDesktopCustFiles, CustC2.jpg.

I would like to show them on a continusous sub form .. I am using image control by setting its control source property but it does not seem to work..Do I need something else for the xlsx and txt files..

View 2 Replies View Related

Modules & VBA :: Animate A Box Image?

Apr 11, 2014

im after trying to make an image on a splash screen rotate around on its centre as a loading icon?

Im guessing i will need a loop on the form opening?

View 1 Replies View Related

Modules & VBA :: Passing Image To Another App?

Dec 27, 2013

I want to use an On Click event on an image field on a subform to fire up either Windows Photo Viewer or Corel PaintShop Pro with that image active - but don't really know where to start. DoCmd, Shell ?

View 5 Replies View Related

Modules & VBA :: How To Add Icon / Image To List Box

Aug 15, 2013

is there any way to adding icon/image to the list box of ms access. what is the way?

View 1 Replies View Related

Modules & VBA :: Identify Image Control Name?

Nov 8, 2013

I have a global function which I have hooked onto the onClick event of controls. Currently I am using commandButtons as my control of choice. In my function I can then reference Forms.ActiveControl which is no problem.

However, for lots of reasons I really need to use Image controls. Now, my problem. Image Controls have an Onclick Event, but they do not get focus so the Forms.ActiveControl will not work.

How can I identify the image control that has generated the click event if the control itself does not get focus and so cannot be referenced by ActiveControl? Working on a possibly work around, but could do with the best brains in Access on the case!

View 3 Replies View Related

Modules & VBA :: Multiple Image In A Form

Jun 18, 2013

How do i actually store and display my image in a form which works when i click on a item in the listbox and it will display the image i want.Currently i'm using a unbound form with listbox and rowsource from Queries.When i click on the listbox it gave me

"you referred to a property by a numeric argument that's isn't one of the property numbers in this collection."

This is the code i tested

Quote:

Private Sub List6_Click()
If Me.List6.ItemsSelected.Item(3) = "DF" Then
Me.Image32.Visible = True
End If
End Sub

the (3) is referred to the 3rd column of the listbox right? is it because the rowsource is from a query that's why i have that error or because the query contains multiple different tables?

is there any simple way to insert image into access and it will appear in just 1 image box ? and depending on which item i click on the listbox the image will change?

View 8 Replies View Related

Modules & VBA :: Display Background Image Via Message Box

Mar 17, 2015

I have a report which is an invoice I have a button on the report to reprint It . Now if this is a duplicate Invoice I need to add a background Image ,something like a duplicate stamp . I have added a message box which says" is this a Duplicate Invoice" .If the answer is yes then I want to display the backgrond image and print the report .If the answer is no, then print report without background image

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved