General :: Opening Specific Invoice From Command Button

Jul 20, 2014

How to modify an existing database template to meet my needs.

I am trying to create a command button that sits on the order details page and that will open up a report i have created called 'picklist' which is basically the same as an invoice but with some different product information listed on it.

I want the command button to open up the picklist that corresponds to the order that i am on e.g picklist #2 for invoice#2

I have 2 issues/questions:

1) I have seen this code on the internet -

DoCmd.OpenForm "SecondFormName", , , "FieldName = #" & Me.ControlName & "#"

Would this work for me if i was to modidy it to:

DoCmd.OpenForm "PickList", , , "InvoiceID = #" & Me.[txtID] & "#"

2) Where do i input this code? If i click on the 'onclick' in the properties form I am presented with this page (attachment):

View Replies


ADVERTISEMENT

Opening Specific Invoice From Command Button?

Jul 20, 2014

I am trying to create a command button that sits on the order details page and that will open up a report i have created called 'picklist' which is basically the same as an invoice but with some different product information listed on it.

I want the command button to open up the picklist that corresponds to the order that i am on e.g picklist #2 for invoice#2

1) I have seen this code on the internet -

DoCmd.OpenForm "SecondFormName", , , "FieldName = #" & Me.ControlName & "#"

Would this work for me if i was to modidy it to:

DoCmd.OpenForm "PickList", , , "InvoiceID = #" & Me.[txtID] & "#"

2) Where do i input this code? If i click on the 'onclick' in the properties form im presented with this page (attachment):

View 6 Replies View Related

General :: Opening Excel With A Command Button?

Jul 12, 2013

I am trying to open MX Excel using a command button. I have tried using a hyperlink a various codes that i have found online with no luck. The Excel file is being used by the Access as it bring data from the spreadsheet a displays it within a subform. (I think this is where the problem occurs) The subform displaying some data from Excel is working fine but when i click my hyperlinked button i am met with errors and the file will not open.

View 6 Replies View Related

Forms :: Opening PDF File From Button Command

Aug 19, 2015

I would like to open a PDF document using a button control on a form to a file path listed in a field on the form (Me.Link). I am trying to use the followHyperlink code but I keep getting the runtime 490 error.

This is the code im using:

Dim strFilePath As String
strFilePath = Me.Link
Application.FollowHyperlink (strFilePath)

If I put a filepath to one of the pdf documents in the place of (strFilePath) it opens that pdf document fine but not when I declare a filepath based on the one listed on the form.

View 8 Replies View Related

General :: Button To Create Invoice Per Record On A Form

Apr 18, 2013

I am creating a database for a local mechanical garage, most of it is setup but i have an issue creating invoices, I need to create a button on a form which will create an invoice per record. Trouble I am having is if i have 1 record it will show just 1, but when i add multiple records they all show on 1 invoice sheet. It doesn't separate records, i but instead it adds the extra records before the page footer :/ causing 1 footer for many records. How to finish the functionality of this DB, i can certainly finish the design side. Everything in this DB is set accordingly, just the invoice system to do i believe, could some1 have a look and let me know? i have tried to upload it here but cant so its on this link [URL] ....

View 3 Replies View Related

Command Button To Open Specific Record

Oct 6, 2004

Hi All,

I have a form called "frmProducts" which is linking to table "tblproducts".

Easy Enough...

The form shows all the Products information (fields).
I have a "More Info" command button (cmdMoreInfo) next to every record in the form.

When the command button is clicked I would like it to open up another form "frmMoreInfo".
But On frmMoreInfo I would only like it to show that specific product.

I have tried the following code on the on click event on the command button but it was always asking me for the value of Form![frmMoreInfo]![txtInternalCode]

Code:Private Sub Command12_Click()On Error GoTo Err_Command12_ClickDim stDocName As StringDim stLinkCriteria As StringstDocName = "frmMoreInfo" stLinkCriteria = "Form![frmMoreInfo]![txtInternalCode]=" & Me![txtInternalCode]DoCmd.OpenForm stDocName, , , stLinkCriteriaExit_Command12_Click:Exit SubErr_Command12_Click:MsgBox Err.DescriptionResume Exit_Command12_Click End Sub

Any Ideas?

View 4 Replies View Related

General :: Creating Invoice Button - Action Query Cannot Be Used As Row Source

Nov 29, 2013

I've created a simple database, with tables, forms etc but I've got stuck when I've tried to insert a 'Button' onto the HOME page which when pressed will display an invoice and give you the option of emailing to client or printing.

I think I've gotten messed up in my relationships or the macros which I've copied from another access template.

on the home screen, I click 'new quote' then 'view quote' when the window pops up and then when it tries to generate the invoice I get the error

'an action query cannot be used as a row source'.

I've put a copy of the database in my dropbox...

View 8 Replies View Related

Opening A Password Protected Excel File From A Command Button In Access

Dec 22, 2006

Hi All,
I have three excel files (ActualHires.xls, ActualPromotions.xls and
ActualSeparation.xls). These are password protected files (with the
same password). They are linked to an access database and whenever the
files are opened, one must supply the password and click the 'Enable
automatic refresh button.' What I was wondering was if this could be
done in access with a command button. I have pasted some code below
that I found but now I'm getting an error.
This is the code:

Dim BookNames As Variant
Dim B As Long


BookNames = Array("O:ExcelFilesActualHires.xls",
"O:ExcelFilesActualPromotions.xls",
"O:ExcelFilesActualSeparations.xls")


For B = LBound(BookNames) To UBound(BookNames)
WorkBooks.Open FileName:=BookNames(B), _
UpdateLinks:=3, Password:="*******"
WorkBooks(B).Close SaveChanges:=False
Next B


But when I click the button, I get this error:
Run-time error '9' Subscript out of range.


and this line is highlighted:
WorkBooks(B).Close SaveChanges:=False


Any help would be greatly appreciated.


Thanks.

View 1 Replies View Related

Forms :: Open A Specific PDF File Per Record With A Command Button

Apr 18, 2013

I need to open a specific pdf file per record by using a command button. The pdf files will all reside in a specific folder in a partition on my hard drive. Each pdf file will have a unique four digit file name e.g 1234.pdf.The file name will match a unique number allocated to each record. This number is generated by adding 1000 to the record ID.Record 10 will therefore have an associated pdf file name of 1010.pdf.I have created a text box field , named 'TestReportID', to capture the unique four digit number per record that I assume is needed to be referred to when setting up the code to find and display the correct related pdf file.

I have set up a command button on the records form and as simple test using the hyperlink address to the folder where the pdf files reside, I can open a pdf file by clicking on the command button but it does not matter what record is open when I click the command button, it will always open the same pdf file.If I don't identify a specific file name in the hyperlink address, when I click on the button it will display a file open dialog which lists all the relevant pdf files and I can then select and open the required file.I would like to cut out that step and get the correct file to open when I click the button.

View 2 Replies View Related

Forms :: Command Button - Form Opens To New Record But Not Specific One

Jul 2, 2013

I have a form that opens from a different form based on the primary key within the original form. Unfortunately it seems to be opening a new record every time I open the form--not only from the original form but also straight from the sidebar.

The command button that opens the second form from the first uses the following VBA:

DoCmd.OpenForm "ZooMobile Incomplete Booking-Return Client", , , "[Event_ID] = " & Me.EventID

This exact coding worded perfectly in a similar set of forms that I had created; the only difference is a change in the form name & primary key field.

Add onto this, I think that the code DOES work, but then it immediately opens another new record. When I open the second form from the command button, then change to Design View, the form's Filter property is set to [Event_ID]=X (where X is the proper key from the first form) and Filter On Load is set to Yes. The X in the Filter changes accordingly when it changes in the first form. Also, every time I open the form a new record is added to the underlying table.

I've tried setting "Allow Additions" in the second form to No, but then when I open the form nothing appears. Literally; the entire form is blank, no labels, textboxes, combos, buttons or anything. When going to Design View it's still all there.

I've also checked the On_Load, On_Current & Form_Current events and found nothing. I even deleted them and the problem still occurred.

View 4 Replies View Related

Forms :: Search For And Upload A File To Specific Location Using A Command Button

Jan 11, 2015

I would like to create a form that allows me to search for a folder on my desk top, then once located i can transfer that file to a specific location on another drive, Similar to the Browse / upload function you see on many applications.I am using Access 2003. Is this possible??

View 5 Replies View Related

Command Button To Open Another Form - Matching Specific Data Fields

Aug 25, 2011

I have a subform in which I want to put in a Command Button to open another form.

I used the wizard as per normal, but when you come to matching specific data fields, there is nothing in my left hand column of the sub form. I have checked the record source property and it is bound to the correct table.

I have read that this is an issue with Access 2007? Is this the case or am I missing something obvious here?

View 3 Replies View Related

How To Create A Specific Search Page And Connect A Text Box To A Command Button

Mar 19, 2012

I haven't used access before and have been set the task to create a data of photos. The table is called 'Find a Photo' and contains 6 catergories of various information including river, site and date. I would like to create a search/command button by which i can type the river, site and date into seperate text boxes and search all of them at the same time.I don't know how to connect a command button to command button and not sure if any macros/queries are needed. Hope all this aint to hard to do.

View 1 Replies View Related

General :: Opening DB With A Space In Filename Via Command Line

Jan 21, 2013

I am working on supporting spaces in the DB filename. I got the rest of my program working... other than being able to invoke Access with the specified filename for it to open.

Code:
C:Documents and Settingsc_mlueckMy DocumentsFandango>"C:Program FilesMicrosoft OfficeOffice12MSACCESS.EXE" "Schema Ideas.accdb"

C:Documents and Settingsc_mlueckMy DocumentsFandango>dir "Schema Ideas.accdb"
Volume in drive C has no label.
Volume Serial Number is C8E4-5856

Directory of C:Documents and Settingsc_mlueckMy DocumentsFandango

01/18/2013 04:45 PM 3,203,072 Schema Ideas.accdb
1 File(s) 3,203,072 bytes
0 Dir(s) 125,846,482,944 bytes free

The envoking of MSACCESS.EXE results in:

Does Access 2007 MSACCESS.EXE not support DB's with a space in the file name being spefied to auto-open via command line switches?

View 3 Replies View Related

General :: Using Command Button To Save New Record

Dec 7, 2012

I have have a form with 4 subforms in it, one of the subforms is based on a filtered query . For a reason I can not work out I cannot get it to requery when I add a new record.

To add a new record I select from a combo box and use a command button to save the record

I have tried using this in the buttons on click event

Code:
Forms.trialcatalogueF!TrialCompetitorsSF!competitorsSF.Form.Requery

with no result, however it does kinda work in the combo's after update event, just not until I select another value.

View 2 Replies View Related

General :: Command Button Enable Or Disable

Jul 27, 2012

I have a form. and it has three buttons. Such as Submit, Reject, Under Observation.

I want :
1) If i click SUBMIT button it will be disable and other two buttons REJECT and UNDER OBSERVATION will be enable
2) If i click REJECT button it will be disable and other two buttons SUBMIT and UNDER OBSERVATION will be enable
3) If i click UNDER OBSERVATION button it will be disable and other two buttons SUBMIT and REJECT will be enable

View 1 Replies View Related

General :: How To Add Keyboard Shortcut To Button Command

May 8, 2013

I am using access 2010 and I created couple of buttons on my forms that do some stuff in vba, but beside triger them with mouse I would also like my users to be able to have shortcuts on keyboard so for example I have btnClose an I widh when user press ALT + that btnClose do the same thing as it is doing when you press mouse on it.

View 4 Replies View Related

General :: Command Button Stays Active

Feb 17, 2014

I have a macro that Runs from a button that I attached to a form called " plans" the macro opens up a Dialog form from which I select a drawing number from, on selection of that drawing number a query is run and finds the information I want

The problem I am having is when I close the query the macro button goes active so if I want to run another query using the button it goes to the last record I selected. I have tried the refresh command but that does not work..I really need the button not to be active when the query is closed.

View 3 Replies View Related

General :: Open MX Excel Using A Command Button

Jan 15, 2014

I am trying to open MX Excel using a command button. I have tried using a hyperlink and various codes that i have found online with no luck. The Excel file is being used by Access as it bring data from the spreadsheet and displays it within a subform. (I think this is where the problem occurs) The subform displaying some data from Excel is working fine but when i click my hyperlinked button (To open the excel file) i am met with errors and the file will not open.

View 1 Replies View Related

Opening A New Form From A Form Using Command Button

Aug 11, 2006

:rolleyes: Hi this is my first time using this forum, I hope someone can help.
I have a form 1 and I want to open another form to display data specific to the record showing in form 1.

I have done this many times successfully but now I am getting an error msg "The sepcified field '[UnitID]' could refer to more than one table listed in the FROM clause of your SQL statement.

I have tried everything but cannot solve this one. Any suggestions?

:)

View 4 Replies View Related

General :: Sending Text Via Command Button To Email

Mar 19, 2014

After inputting data into a text box on a form i want to click on a command button which will open an email program and then put the text there so i can send it.

View 1 Replies View Related

General :: Command Button To Insert Records From One Table To Another

Aug 11, 2013

I have two tables, one is GENETIC and the other one is BoneSampleDNAprofile. Both tables have the field CY-Code. I want to create small form with 2 text box fields and one command button on the form to be able to insert CY-Code from the table GENETIC to designated DNA_LAB_Code in the table BoneSampleDNAprofile.

In that small form I would type DNA_LAB_Code and CY-Code where after pressing command button will insert CY-Code for the designated DNA_LAB_Code. This is continuous process after our Laboratory receive results from DNA laboratory. I have attached two .png files which are example of two tables.

View 2 Replies View Related

General :: Command Button Not Working In ACCDE File

Oct 19, 2014

I have created an accdb file and saved as an accde file. The accde file opens with a form with command buttons. But the commands buttons do not work with the accde file (they do work with the accdb file). How do I get them working.

View 7 Replies View Related

General :: Command Button To Insert Picture In Form

Nov 17, 2012

In form I want to put a command where we can browse a picture and insert it...how to do ...

View 5 Replies View Related

General :: Playing MP3 Files From Command Button On A Form

Apr 3, 2013

Beginner using 2010. I wish to play MP3 files from a command button on a form. I would like to avoid third party / ActiveX controls if possible.

I am aware that use of "CurrentProject.Path" will be useful to locate the MP3 file within a directory within the Project Folder.

But have be baffled by the sparse previous postings about this subject (going back to 2004). Searching this forum yields zero results on the term "MP3".

This accdb/e will be used to present historical information to a small number of people and will be used with runtime without user input.

And all I need is Play / Pause / Stop. No other functions required.

View 10 Replies View Related

General :: Command Button To Email Report From Form?

Jan 30, 2014

I have a form that records data entered by a user who I then want to email the record via a report run from a query.

I created a command button on the form with DoCmd.SendObject acSendReport,"name_of_report", "format", "to","subject", False

The email program (Lotus Notes) opens a new email msg with the report attached as pdf. However, the data recorded does not appear.

View 5 Replies View Related







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