This is a new post for this same question. The database that I am working on is set up in a very complicated way to me. The database tracks grant applications and awards. Right now there is a section in the database where one can enter a new record (Well this record is imported from an excel file filled in by the person who wants to update a current application or award for a grant) So when the amount changes on a grant a new record is created but the old information needs to be kept for future references. So this information is keyed into a subform on the same form as the new record. This is quite a bit of information, so I want to know if a button can be created to export this single record to the archive file set up on the same form (same format--different color fields- subform) Basically, I would also like to create a pop up question to say "Do you want to archive this record" the answer would be yes and the record would go to the archive subform (which is our archive query) I hope this makes sense. Thanks!
I am trying to create a form with a button attached to each record that would allow the user to click the button and it would automatically open outlook and fill in the TO:, SUBJECT: and BODY: fields. Here is the code that I currently have:
Code: Private Sub Command33_Click() Dim strEmail As String Dim strMsg As String Dim oLook As Object Dim oMail As Object Set oLook = CreateObject("Outlook.Application") Set oMail = oLook.CreateItem(0)
[code]...
There are two issues I keep running into:
1. This code opens outlook and populates all of the fields but pastes the email incorrectly. Instead of pasting just the email (email@email.com) it pastes the html tags as well (email@email.com#mailto:email@email.com#) which means that the user would have to delete everything between the #'s in order to send the email every time.
2. I currently have the email BODY pulling from a table but this obviously limits what I can do. I would like to simply encode the BODY within the VBA code. The setup I am looking for is: one paragraph a blank line a hyperlink to a website a blank line another paragraph
This may be a really simple problem but it has me stumped. Working in Access 2002, I have a form with a subform (continuous). When the user clicks on a textbox in the subform, I need to capture the value and pass it to the main form so that it can be used to create a filter for yet another subform (not nested) on the main form. How could I accomplish this? Thank you in advance!
Is it possible to send a copy of a record to another table already created? if so what is the sql statements to do so or any other ideas that you might have.
I have two unbound unlinked subforms residing on a 3rd unbound main form. When I enter the current record on Subform1 I would like the matching record(s) on Subform2 to be highlighted or otherwise formatted. I can get this to work for only the first record on subform2 due to the way I have my code setup on Subform1:
Code: Private Sub Accounting_Unit_Enter() 'find where AUs match. only works for first Subform2 record If Me.[Accounting Unit] = Forms!MainForm.[Subform2]!AccountingUnit Then msgbox "Match" End If End Sub
My thought was that I needed to reference the Recordset of Subform2 and search for all AccountingUnits that match the current AccountingUnit of Subform1,
I want to use a query as the record source of a subform. I want to be able to actually write the query out, not refer to a query object, because I want to change the query on the fly using VB.
This subform displays records when I have it opened by itself, but will not return records when it's displayed as a subform. Does writing the query out not work for subforms?
I have a query that appends a new record to a table called "tblMain". The tblprogeny I am querying does not have two fields the 'tblMain' has (Group and Location). By the mere nature of this type data, the value for both fields are static thus I did not include them on the data entry form for the tblProgeny. I would like to include them on the append query if I can. One field is "Group"with the static value at "Non-Active" and the other is "Location" where the static value is "Nursery"
I have tried to use the following expressions in the criteria field of each respective field slot of the query:
[tblgroup.group to tblmain.group] 'Where ([tblgroup.group]= "Non-Active")'
[tbllocation.location to tblmain.location] 'Where([tblLocation.Location]= "Nursery")'
But it gives me an error that my syntax is not right? tblgroup.group to tblmain.
In the following code, I debug a problem with the CurrentDb.OpenRecordset
Code: ' --- ' ENVOYER UN MAIL DEPUIS ACCESS ' --- ' Entree : strEmail <- Adresse e-mail du destinataire ' strObj <- Objet du courrier ' strMsg <- Corps du message
I have a form that shows multiple rows of linked/child records.The form in question is the "frmFilterNumberTypeView" form. When a particular filter is used (installed on an automobile), I would like to be able to click on the corresponding "Installed 1" button left of the filter number, so that by code, I can reduce the Qty on Hand by One, and insert the corresponding filter ID to the History table, along with the date/time the filter was used.
how to reduce the Qty on Hand, nor how to do the updates to the History table, I'll figure that out myself over the next week or two (hopefully it won't take that long). What I'm trying to figure out here is how I can associate the red "Installed 1" button with the filter to the right of whichever button I press.
how to sort the filter column on this same form. I'm fairly certain that this would be very easy to do if the subform in question was populated by means of a corresponding query, but I'm afraid that if I go that route that I'll spend another 20+ hours trying to figure out how to get the proper filter records to match the filter manufacturer, not to mention having to next figure out how to link the table so that if I modify any particular filter record, that I'll be able to have the associated table update accordingly.
Is it possible to sort the filter column without the subform record source being a query?
Hi, I am a complete idiot with VB/SQL/*anything for that matter*
Made an unbound form to search and retrieve records from a query (parameter query) (for property listings)
I've got the following fields in my "Search_Form"
1) Project (combo box pulls data from projects table) 2) Size (from - to) 3) Rate (from - to) 4) Date (from - to) 5) Price (from - to)
I've set variables for each field .... VAR_sizeFROM....... VAR_sizeTO etc.
Now here's my problem.
1) How do use VB to send the user inputs from my "Search_Form" to "Search_Query". And is it possible for either of the search fields to be blank in the form?
2)How can I do the same for a report?
Please help, I've been stuck with this for some time..
I have a simple SQL query that is e-mailed when there are >0 records. Fairly consistently, the SQL code in the query is wiped out and the query fails. It happens consistently to this query, even though I have many similar queries. I am running Access 2013 in Windows 7
SELECT AR.[Inv#], [History Header].[PO#], AR.[Customer Name], AR.Date, AR.Mdse, AR.Freight, AR.Amount, AR.[Due Date] FROM (AR INNER JOIN [History Header] ON AR.[Inv#] = [History Header].[Inv#(number)]) LEFT JOIN [Advanced Engineering Payment Reminder Sic]
I am trying to send a report to a list of employees. I have a query that generates the report into the layout I want and includes the e-mail address of who the recipient should be. The report looks something like this:
I need to send, for each row in the query, this report based on the results of that particular row. How would I go about making a e-mail template that would be used, or at least sending the report as a PDF attachment? I've seen the sendObject method.
I have records using a select query that I am sending to a make table. I would like to have those records excluded from being used again for 180 days, at which point they can be used again. Essentially, I have an ID and an email address which gets stored in the Make Table. I would need to ensure that if we send an email out in Week 1, we do not send an email again for another 180 days if there is activity from that same ID. On day 181, the ID/email address can then be resent.
Any code that stops the vba from running if an 'output to' function is null. I've found some code using the DCount function but I'm struggling to adapt this to multiple excel outputs.
I'm sending 5 excel files via E mail to several addresses and I'm wanting to identify if the first file has records, currently using access 2010.
I have got a form (name: SearchForm) that displays results of a query (name: AircraftSearch). It is a continuous form displaying multiple results of a search done by the query. I need to be able to send an e-mail to multiple recipients chosen from results displayed on the form.
One of the form's field (a text box called: EmailToOperator) is containing e-mail address to an aircraft operator selected by the underlying query. I need to be able to place a check box button (or something similar) that is going to select the e-mail address. The tricky part is to have multiple check boxes allocated for each record displayed on the form and have them working independently.
The second task is sending a one message (via Microsoft Outlook 2010) to chosen multiple recipients (with no attachments) having the recipients' addresses not visible to each other.
At present I have a tblData, a tblPeople, a long union query and a report that displays its results. On a form I select a person from tblPeople (another field on that table contains their email address), run the query and report in that person's respect and email the results to them.
What I want to do is add a button which runs some VBA code which cycles through tblPeople, runs the query for each person, works out if the query has returned any records from tblData for that person, and if so - sends them the report.
I have two subforms on a main form. Both use similar queries and nearly the same set of records and PK. The first subform is for data entry and the 2nd subform is a continuous form that lists the entries in order that are made from the 1st Subform. (for entering in vacation days and appointments)
The continuous form cannot be edited, it is to be a list for viewing the information only.
I have an edit button next to each record on the continuous form. When the button is clicked, I want it to take the 1st subform to that specific record as well (same PK), so the information can be edited there.
I cannot figure out how to get the 1st subform to go to the record on the continuous form when the button next to that record is clicked on the continuous form.
I tried the DoCmdSearch for record and just keep getting object is not open errors.
I have two sub forms on a main form.Subform 1 displays information which comes from a query, filtered using two combo boxes on the same form.The active record on the data sheet has two field values output to hidden text boxes on the form.
These text boxes then provide the values used for the query displayed on the 2nd sub form.When I highlight a new record in subform 1, the text box values change, but the values in sub form 2 do no.Which would be the best method to use to get this to requery?
When we browse through records in a subform we store the records in the database.When we want to delete a records for example the third record from the five records always the first records will be deleted. How can we delete the records where the cursor is at? When we are at the third record and press the delete button the third record from the list in the subform should be deleted.
Code:
Option Compare Database Dim FocusBln As Boolean Private Sub Identificeer() Me.[Datum Aangemaakt].Visible = True Me.[Datum Aangemaakt].SetFocus If Me.[Datum Aangemaakt].Text = "" Then
When I add a record in the subform and then move to the next record whilst still in the subform, the main form jumps back to its first record? I then have to move back to the right record in the main form to update the next record in the subform.
I want to move to the next record in the subform without affecting the main form.
I have a database which has a main form and subform built in linked by parent/child customerid, what i would like to do is search all the subform records from the whole DB and return its parent record on the main form?
Can this be done? because if i use find it will only search the filtered form i have onload of the form?
I would like to select a record from my combobox dropdown list and have that record populate in my subform. Currently, I am only able to select the 1st record at the top of the dropdown list to appear in my subform. But I would like to select any record from the dropdown list and have it populate my subform.
I have an ordering db that utilyzes the typical Form / Subform layout. I would like to be able to delete a record from the Main form and maintain the same postion relative to the other records. For example, if I am scrolling through the records and want to delete record #45, After I delete it I would like to be able to have record #44 visible to the user.
I am currently using (2) SQL statements to delete the records from the main Order table and the Order Details table which are linked without Cascade Delete Related Records being on.
I had set-up a recordset procedure to try and find the bookmark set before deletion but the only way I can get the sub-form to not show a blank form (no controls visible for the record just deleted and the #deleted in controls on the main form) is to requery after the delete, which loses the bookmark. If i place the ReQuery at the end it displays the records properly, (without the blank record) but returns the record to the first record. I have tried turning off any sorting references to OrderBy, etc. but it still returns to the first record.
I have also tried using "DoCmd.RunCommand acCmdDeleteRecord" but it doesn't delete the record from both tables.