I made some custom icons for use with command buttons, and I made them ICO
files with transparency.
However, after I assigned them to my buttons, there's a light grey
background colour - which doesn't look all that great.
Is there a way to import images with their transparency intact? There must
be, since Access' built-in buttons are transparent.
Do I need to use a different image format? Or are there other tweaks to make
this work?
I found the following getimage script but am not sure how to apply it to my button, I have seem various examples on sites but just can't get it to work. Can I somehow set the icon path like C:Image1.png
Code: Public Sub getImages(control As IRibbonControl, _ ByRef image) Set Image = LoadPicture(getAppPath & control.Tag)
' Maybe something like ' Set Image = LoadPicture(c:image1.png) End Sub
I'm just creating my first db. When I'm on a form looking at a previous record (in this case a transaction), I need to be able to make a minor change to that record (such as the date for a repeat transaction), and then save the record as a whole new record. The button commands I found in the wizards only let me save over the current recond after an edit. Anyone know the easiest way to creaet a command button that does this? Thanks for any insights.
I can't believe I haven't come across this problem before, but I want to add a button to a custom menu I've created. When clicked, this button will run some code I've written.
It may be that I'm losing it (no comments, please :D ) but I can't work out how to add a button that will run code of my choosing, as opposed to just opening a report, opening a form, etc.
I want to create a custom command button that when clicked hides elements (such as a box, a label, etc) on a specific form (the switchboard) and shows another element (a sub form) I guessing I would create a module check if the active form is the form called switchboard then using the .Visible properties of each element I want to hide set it to false, and the opposite for the sub form.
Questions I have 1- how do I check if the active form is the form called switchboard - and if not how can I switch focus to the form called switchboard 2- working with modules can i simply call each element like the following Me.CategorySubcategory.Visible = False? 3- now how do i have the code in the module execute when the person clicks the custom command button (i guess it has to do with the on action event in the property for the custom command button but not sure what)
I would like to create a command button that saves a report as a PDF. Currently I am using the built in "PDF or XPS" button but it always opens Adobe reader at the end and also a dialog with the option to save export steps. I want nothing other than a simple save dialog like I can do with a VBA command, but is it even possible to add a custom command to the quick access toolbar?
I know you can add custom commands to the ribbon but the user of this database keeps the ribbon minimized due to it eating up too much of his screen space. The QAT is always visible.
i would like to create an browse button on my form so i can find the pictures i would like and then to been shown on the picture field on my form. i tried the northwood code from help but i could manage nothing woth it. do you have any idea to help ,me please??
Is it possible to have a cmdButton open a pre saved image from your hard drive. The images are saved with the same name as the Account Number. (ex: AcctNum -- TA123409 Image -- TA123409.bmp) I want the cmdButton to open the image filtered or based on the Account Number. If so, could someone show me a sample OnClick code. Thanks
I'd like to put a button in a form that when clicked opens an image on the computer, the location of which is already specified in a field called RefImage.
When I change the hyperlink property I can only have the button open a folder or internet address rather than a unique image for each individual record.
If I use the code builder for the event on click and try to write Application.FollowHyperlink RefImage it gives me error message 490 that it Cannot Open the Specified File, but this is probably because I don't know how to write VBA.
Any simple way to make a button on a form open an image in IE or windows image viewer which has a path specified within a field of the form? Perhaps someway to use the Application.FollowHyperlink, clearly I am doing something wrong.
How to stretch a picture so you can see it nicely proportioned over a button? I would like to use images over buttons but its always messed up looking.
I am building a db for reservations for my limo company. I want to have a cmd button that verifies the user to make sure she wants to delete a run. This is what I have so far:
Private Sub cmdDeleteRun_Click() Dim Response Response = msgbox("Are you sure you want to delete this run?", vbYesNoCancel + vbCritical, "Really delete run?") If Response = vbYes Then
End Sub
I don't know what I am missing for the cmd to actually delete it.
I got an image bitmap that I want to use to customize my button. I got following error pop up."Image Generator" - "search key not found in any record".I'm using access 2013
I have a main form and a sub form. Tbhidden and tbpropersave are the text boxes that govern the update procedure. The main form has two text box that i use to prevent the user from modifying the information on the main form without clicking my custom save button. the problem is that the subform should be completed after the information on the main form has been filled in. The Update code i have refuses to allow me to complete the subform without first clicking the save button on the main form. Here is the code. I wana be able to fill in info in the main form, then the sub form then click save. The sub form is a table which relates to the main form table Many to One.
Private Sub Form_BeforeUpdate(Cancel As Integer) On Error GoTo Err_Form_BeforeUpdate
Me.tbhidden.SetFocus
If Me.tbPropersave.Value = "No" Then Beep MsgBox "Please Save This Record!" & vbCrLf & vbLf & "You can not advance to another record until you either 'Save' the changes made to this record or 'Undo' your changes.", vbExclamation, "Save Required" DoCmd.CancelEvent Exit Sub End If
Exit_Form_BeforeUpdate: Exit Sub
Err_Form_BeforeUpdate: If Err = 3020 Then 'Update or CancelUpdate without AddNew or Edit Exit Sub Else MsgBox Err.Number, Err.Description Resume Exit_Form_BeforeUpdate End If
I have a field in a Table (tblMainFile) named "File Location" which contains a hyperlink for each of the files.I have a continuous form (from a query) which displays information from the tblMainFile table.the form shows a text box (with the hyperlink) which is clickable to take them to the link location.I would like to have a button which says (GET FILE) or a different text box which simply says "Get File" as opposed to the entire hyperlink.
I've been working on a database for work for the last few weeks and this forum has been a Godsend many times over, but now I have a problem that I can't find any reference to.
Using Access 2003, I have a form that uses 3 cascading combo boxes in the header to find a unique record, and a command button that brings up the rest of the record into unbound fields in the body of the form.
It works fine for finding records, but whenever I enter/change data on it, the record doesn't save. The navigation buttons at the bottom don't work - the Next/Previous record buttons are disabled, and the First/Last Record buttons do nothing.
Navigation buttons are enabled/activated in the properties.
I tried getting around this by creating a Save Record command button - first using the wizard, then using VBA code DoCmd.RunCommand acSaveRecord as advised by [missinglinq;696351], but this still doesn't save the changes.
in the attached form i can select multiple image but my next and back button does not work ,also i want the path to the file shown above.to copy the name from there and paste it in the table,to write remarks.
Just spent most of today and all evening trying to get this to work and access keeps giving me a Run-time error '2465': Microsoft Access can't find the field 'frmPlant_Sub1' referred to in your expression.
I am trying to write the code for Custom Navigation Buttons like - Next, Prev, First, New & so on. To keep it simple for this post I am referring to the "Go to previous" record action.
I have a main form [frmPlant_Main] that is not bound to anything, it just acts as a holder for the sub-form and contains a couple of labels like the database name and so on.
On the main form is a sub-form [frmPlant_Sub1] that is bound to the table that contains the actual data.
On the main form I have a command button called [cmdGoToPrevious]. On its "on click" event I have tried various code but none of it worked. I have searched all over the net but with no luck. I keep getting the same run-time error.
Below is the code that I am currently using and any suggestions would be great.
Thank you in advance,
Kenny
-----------------------Code Begins--------------------- Private Sub cmdGoToPrevious_Click() If Me!frmPlant_Sub1.Form.CurrentRecord > 1 Then Me!frmPlant_Sub1.SetFocus DoCmd.RunCommand acCmdRecordsGoToPrevious End If End Sub -----------------------Code Ends-----------------------
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.
Is there a way to use a command button to perform the exact same function as the "What's This" (?) button on the title bar? Is there code I can give it "On Click" that will make it do the same as as the What's This button?
Hi all , Can anyone tell me about how to embedd image in image control using imagelist. I added the 5 images in imagelist at design time and added the following code. image.picture=imagelist.listimages(1).picture but iam getting error.error no :2110,cannot open the file . thank u, Siva
I'm in desperate need of help and want to know if it is possible to load an image on a form once a hyper link is created.
For example, I have a form with a hyper link to an image created, currently, when you click on the hyperlink, it opens the picture in the browser, can you change it so that it loads teh image embedded into the form instead of loading it into a browser?
I have created a web-database (? - There are globes over all the forms and tables icons) based on the Issues & Tasks template. This means that most of the data is entered and seen on the "Main" form, which has two tabs - Open Issues and Closed Issues. I have created a form that allows people at my work to input the necessary data and save it, so that it will show up on one of the two tabs. However, once a record has been created, I want to be initially locked if the ID/PK is clicked, so that data can't be changed or entered inadvertently.
SO, I changed the code so that when the ID/PK for a record is clicked, it brings up a different form, but one that looks exactly like the one that is brought up when entering a new form, but I locked all of the fields so that the information cannot be changed. It seems from what I have read that I can create a button on this form so that when clicked, it unlocks the fields on the form so that they can be changed, and then when clicked again it will lock the fields again. Is this true? If so, how can I do it? Or is there something similar I can do? I have seen codes that I could copy and paste, but I cannot figure out the place to copy and paste codes in Access 2010.
I have changed the Form properties so that Data Entry and all the "Allows" are set to No...
I need to update a graphic on my form as part of the record information. Specifically, I have a graphic of the human body, and need the user to be able to mark the area where it hurts-scribble or put an "X" there-whatever. This modified graphic then needs to be stored somewhere and associated with that particular record.
Has anybody done this? Any suggested starting places?
HI all, I have recently created my own custom toolbar for my database which works fine on my computer, but when the database is transfered to another computer via a memory stick (needs to be done as it is going to be used on remote laptops away from the main network), the custom toolbar does not carry over. Instead of the custom toolbar being shown, the normal, main toolbars are reset to the default ones shown.
Is there a way of stopping the toolbars reseting when transfering the database so that my custom toolbar is the default toolbar?
I have a custom toolbar in my application. However, it isn't visible at the top of the application window and when I try to make it so - via View - Toolbars - it doesn't appear on the list of available bars.
I had assumed that I had somehow deleted it, but I know it's still present somewhere, as when I try to recreate it, I get a message saying so.
How can I get the toolbar to be displayed? :confused: