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'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 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 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'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.
Creating and installing a custom icon for my database but I'm still seeing the access icon. I've done these things:
-I made a 32x32 bitmap in photoshop. -I saved it in the same folder as my database. -I opened access 2007 with my database -I went to access options/current database/application options/application icon and browsed for my bitmap. -Clicked on use as form and report icon. -Closed everything and reopened my database.
I couldn't see my icon anywhere in explorer, access or my desktop shortcut for my database.I repeated all this except I put the bitmap into an online icon creator and downloaded an .icon for win vista and win 7 which I selected as above.
I have converted a 2003 database to the 2010 file format. In the 2010 database, I have created the USysRibbons table with 2 separate ribbons. One of the ribbons need to load depending on what the user chooses upon opening the database. I have a form that opens with the database and the user can either choose "Premium" or "Subsidy." I'm uncertain as to why the conversion will not replicate how the database works in 2003 but if I had to assume it would be because of the ribbons. I found a small piece of VBA that I think needs to be changed but I'm not sure to what or how. As of right now, I don't have a ribbon loading, just the form to load when the database is opened. Except I noticed that the "add-ins" opens the correct menu depending on which the user chose.
I actually went into Options--->Current Database--->Ribbon and Toolbar and selected a generic ribbon (File, which just has exit because it's the same whether the user selects Premium or Subsidy).
To clarify if needed, the user doesn't actually log in. The form that pops when the database opens has the drop down of either Premium or Subsidy. So really it goes like this:
Open database Select Premium Click Enter Premium ribbon loads
OR
Open database Select Subsidy Click Enter Subsidy ribbon loads
Technically, if I could have just the form pop I'd be cool with that because on the form there is an Exit Application button where the user could click and exit the database. When either the Premium or Subsidy ribbon is loaded, I already have an exit in the coding.
Public Sub openRegion(authority As String, region As String) If (cboRegion.value = region) Or (region = "ALL") Then 'open region selected If cboRegion.value = "PREMIUM" Then loadPremium authority
I'm looking to simplify some aspects of our company's order database, including standard notes that appear on the sales orders that we send to customers. We have different lines of business and the notes vary. We currently have several reports, depending on the type of order, with the notes hard coded in labels. It's not an elegant, nor scalable, solution.
Our ideal solution: One order report only, with an option for the user to select one or more notes from a list when they enter the order. I'm thinking a popup form with a checkbox next to each note, where each checked note will print on the order report.
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've created a custom ribbon for my end users (Access 2010) and everything looks and works great except for one issue that is becoming a deal breaker for me and my end users:
I've got a number of tabs on my custom ribbon and on each tab there are a number of buttons that open various forms and reports. Anytime one of those forms or reports is opened and then closed, the ribbon jumps back to the first tab in my custom ribbon. So if you were on tab 3, opened a form and then closed it, you would be jumped back to tab 1.
Any workaround for what seems to be "by design" behavior for custom ribbons? The built-in ribbon does not do this.....
My database has been set with the 'All records' locking option set to prevent two or more people editing files at once. This is working fine but I wondered if there is a way to make a more personal message appear instead of the default Access one, just to maintain a uniform look.
how i can get a current user from a custom login form CurrentUser() this function always return a system user name admin as default. In my login schema i have a Hidden splash form that have a unbound field that holds user name from custom login form after login a dashboard execute and also display user name on dashboard according to user login ,this working fine for mine. Actually i want to make a currentuser stamp in every entry when a record is entered in database.
In Access 2010 I made a custom ribbon.The File Tab still gives users access to features that should not be available to them such as: Compact & Repair, Encrypt etc.I spent a few hours looking for a solution but found none that works.It does not seem to be possible to hide the File Tab, but is there a way to hide the options it reveals?
I was wondering if it is possible to create custom security permissions in access. For example I have created an employee database, with security. I would like to have it when a manager logs on, it will only display his employee's information and no other departments. Is this possible?? In one of the tables is a field for the department the employee works on, can it based off of a table field?
I was wondering if it is possible to create custom security permissions in access. For example I have created an employee database, with security. I would like to have it when a manager logs on, it will only display his employee's information and no other departments. Is this possible?? In one of the tables is a field for the department the employee works on, can it based off of a table field?
I use custom categories in the navigation pane to make finding the right objects easier (duh) but now I have quite a lot of custom categories and they are stuck in the order they were created in.
I would like to rearrange them into some logical order (maybe alphabetical, maybe custom) so i can find the categories quicker.
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-----------------------
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?
I have created an application. It has a split front end and back end. I plan to distribute the runtime version. I have used code throughout that "hides" the microsoft access shell for popup (modal) windows. In every form & report I have a function to show or hide the access window. Everything works great until I get to my reports. I open reports in print preview. I created a custom table (USysRibbons) and added a Reports print preview ribbon & xml. I assigned that ribbon to my report(s), and I assigned it in options as the default ribbon. If I test the ribbon (by working in the database using "shift" open) I see my ribbon. But, in when I open app without shift or or if I emulate runtime, I can't get the ribbon.
I have multiple popups forms, several non popup forms and a couple of reports.I just want to keep all the access background stuff hidden - except for needing the ability to print.
My Add New Record button doesn't work....The backstory is a little complicated but essentially this was an Access 95 database that was upgraded through office 2003 to Office 2007 a few years ago (.accdb converted). The database became corrupted post Office 2010 installations a few weeks ago but today I have loaded a restored database onto an XP Machine with Office 2007 and the same issue occurs (ruling out Office 2010 as the cause).
I have an Add new record button on the form, it doesn't work with the code:
Code:
DoCmd.GoToRecord , , acNewRec
This always brings up the message: "You can't go to the specified record.".I have tried adding a new button to add a record via the wizard, I receive the same results.I have tested adding a record via the table, that works fine.