I have a list box that I can select mulitple items from - I then click a search button and it runs a query that finds what I am looking for from a table and then displays the results in a subform.
In the subform I can input weights and get a percent....anyhow.
How do I set up a button so that it will print out a report or the report from the subform information that is currently being viewed.
Also, I can already do this by clicking a button on the form and pulling up the installed report program but, you need to input data to get this report.
I kinda want this button to be a "I need it now" type of print option.
Thanks...as always my questions are probably confusing...:D
Often I use Labels as buttons due to the fact I can colour them the way I want, and use the on click event to trigger code. The code below however works for a command button, but not a label button.
DoCmd.OpenForm "frmdatetime" Do While Forms!frmdatetime!OKFlag.Caption = "False" DoEvents Loop
When this code is run by clicking on a command button, it works fine. If run by clicking on a label, frmdatetime opens, but the mouse will not work on either of the 2 open forms unless you go down to the windows task bar, jump onto another window, and back onto frmdatetime. If I remove the loop with the DoEvents in it, then the problem does not occur.
Can anyone enlighten me as to why this behaviour occurs.
I have created a form to select multiple records for a transmittal report. I added a button to the form which I would like to open the report to view the current record. In the On Click event I added the following code:
Private Sub cmdPrint_Click() Dim strWhere As String If Me.Dirty Then 'Save any edits. Me.Dirty = False End If If Me.NewRecord Then 'Check there is a record to print MsgBox "Select a record to print" Else strWhere = "[TransmittalID] = """ & Me.[TBLTransmittal.TransmittalID] & """" DoCmd.OpenReport "RPTDwgTransmittal", acViewPreview, , strWhere End If End Sub
The debugger keeps highlighting the row above shown in red. I've used this same code before on other forms and it worked but not sure why it isn't working this time. The only difference with this form and previous ones is that this form contains a multiple values combo checkbox (hope that's the correct term). The query that the report is based on changed the names of the field names so that TransmittalID on the form is TBLTransmittal.TransmittalID in the query.
I've tried the code with and without the extended name but each time the "Do.Cmd..." is highlighted.
I have a form on which I have a button that I want the user to click after a cetrain field on that form is updated. I display a little pop-up box saying to make sure that a user clicks on that button. Is there a way to know that this button was clicked? Is there a way to not proceed with anything else until that button is actually clicked?
I have a form with a number of drop-down lists on it and each of these lists is bound to a field in a table.
When I return the results of a search to this form I want to allow users to be able to cycle through the records and change them if they want. However, the changes should only be saved if the user clicks on the "update record button". This button is simply the save record button by the MS Access wizard.
At the moment if they change the value in one of the drop down lists and move onto the next record the change is saved even though the user doesn't click any button. I want to prevent this from happening.
Any ideas on how I might achieve this?
If I prevent "AllowEdits" in the form properties I can't update the form using the "update record button" either.
Just a query (no pun intended). Is there a way to ping an ip address which is taken from a table and at the click of a button it pings? Bringing up the cmd app to show the results.
I currently have a form with a button that once clicked displays a word document,however I have to double click on the button even though the code is on the single click event property.The only line of code is as follows OLEFile.Action = acOLEActivate
Does any body know how I can get the single click to work ?
I was wondering if there is any way to control a user's input in to a form such that data entry does not automatically create a new record. Is there any way to collect all inputs in the text/combo boxes and create the new record only when a button is clicked? Cheers, David.
First I should say that this is my first post, and I'm very new to this. Now on to my problem. We have a form with a bunch (like 25) of buttons that are links to specific reports. When you click on one of the buttons the report opens up along with a little pop up form with a print button on it. How can I get this print button to print the report that is open? Do I have to put in code for every possible report that may be open, or can I just say "print the current report" somehow?
I have this command button whose caption switches from update record to save record with a msgbox verifying if the person really wants to take this action. On click the user is then allowed to update the record then in theory they would be able to hit the same button whose caption now reads save record, the msg box would appear with a yes or no answer required. The code I have is putting the msg box after the user clicks the update button.
Anyhelp and/or suggestions would be most appreciated!
Private Sub cmdOpen3_Click()
stDocName = "frmSearch"
If cmdOpen3.Caption = "&Update Record" Then If IsNull(Me.FTMSubform.SourceObject) = False Then Me.FTMSubform.SourceObject = "frmFTMInfo"
If cmdOpen3.Caption = "&Save Record" Then If IsNull(Me.FTMSubform.SourceObject) = False Then Me.FTMSubform.SourceObject = "frmFTMInfo" If MsgBox("Save update to this individual?", vbQuestion + vbYesNo, "Save Update?") = vbYes Then DoCmd.Save DoCmd.Close acForm, "frmFTM" DoCmd.OpenForm stDocName Else MsgBox "Return to the FTMInfo Form!", vbInformation, "Save Function Aborted!" End If End If End If End Sub
I am building a database with a single table of records. I have created a form to allow new entries to be made to the table in a user-friendly way.
The problem I’m stuck with is how do I restrict the addition of new records on the form? I want the new record to only be added to the table upon the click of a button, but at present if I tab through, or exit the form the record is saved anyway.
Not all fields on the form are required input so I’m thinking that validation of every field is not the way to go.
I only ever want the record to be saved if a user clicks on a button and under no other circumstance.
I've been trawling through the posts back to about page 15 so any help would be appreciated.
Hello everyone!I need to call the button_click procedure for a button on a form (button1), from another form, if you see what I mean!.Basically the user opens form1. They click a button which opens form2. Once they have finished on form2 they press the close button, which is the point where I need to call the button1_click procedure on form1.I imagine it's something like this:Call Forms![frmForm1]![button1]![Click] orCall Forms.[frmForm1].[button1_Click()]But no matter what syntax I try it just won't work! They're very basic forms, with only 2 buttons on and basic commands.Any help appreciated! Thanks
I have a continuous form with button for every record, wich has a VBA code. I want to put Button in header form, when i click it, then should run all button in continuous form. How can I do that.
After data is entered into text box, on the "On Enter" event, how do I make it click a button on the form?Similar to the effect of when you enter your username then password, most people just hit enter on the keyboard to auto click the login button.
Hi... being extremely new to Access, i am sitting here frustrated as anything trying to make this work. I will attempt to explain what I am trying to do.
I have a form that has a combo box in it. This combo box references a table and pulls in the data depending on the company that is selected. What I am trying to do is add a print button on the form, so that the users can print off an address label. Now I can use the normal print report feature and this prints of the entire report, but what i would really like is the print button just to print the fields I want and not the whole thing. The fields I want to print are.
I have created a command button that prints a report. The thing is that if the REPORT has no data, i want that the button is INVISIBLE. Is it possible to do this??
I am having a minor headache with a situation, I have a command button that opens a view of the report that will be printed. The problem is if someone creates a new record and hits the button it comes up blank.
If I add me.requery before the DoCmd statement then it just restarts to the very first record and shows that in the report view =(
Any Ideas? Thanks Guys!!
Private Sub PrintForm_cmdbutton_Click() On Error GoTo Err_PrintForm_cmdbutton_Click
I have documents (mostly Word) stored in an Access table. The table contains two fields. (1) a text field with the document's name and (2) an OLE field that holds the document.
When I press a button with the document's name on it (or it could be a hyperlink or a dropdown) on a form then I would like the document stored in the matching OLE field to open in the appropriate program for that document.
If I could set the permissions of the document to read-only then that would be great too. If I could prompt for read-only or read-write (no password necessary) access upon opening then that would be even better.
I can store documents in the table, but I have no idea how to launch them from a form button (or hyperlink, or dropdown).
Note: This is all within Access. This is not a web page related question.