ms-access

Display Button on Form (Continuous) Depending on record

a 夏天 提交于 2021-01-29 12:11:43
问题 I have a list of Records that I am Displaying in a continuous form. I am also putting buttons in this form. IE I have a list of "exams" on the list I have buttons for each exam such as a DELETE Button, EDIT button and so forth. I want to add another button only if the exam has a certain variable set. Record Set Example | Key | ExamName | ExamLocation | ExamDate | ExamComplete | |-----|-------------|--------------|----------|--------------| | 1 | Test Exam 1 | TX | 10/2/19 | Y | | 2 | Test

Junction between categories

旧街凉风 提交于 2021-01-29 11:27:35
问题 I am making a database for a freelance sign language interpreter. I have a subject table tblClient which holds information regarding the freelancer's clients. There is a lookup table tlkClient ClientType showing the various types of clients (categorized on condition -- deaf, deaf/blind, etc). There is also a table called tlkClient Modality. In this table are the different types of sign language offered by the interpreter. You can pick the client's preferred modality from the Client table. Now

Sending Email using Access VBA

雨燕双飞 提交于 2021-01-29 11:04:11
问题 I am attempting to send an email out of Access. The email is not automatically sent. I have to hit send on the email pop up. Is there something missing in my code that is preventing the email from sending. Dim strTo As String Dim strMessage As String Dim strSubject As String strTo = "Hazat.Bangurah@umm.edu" strSubject = "New Lab Charge Codes" strMessage = "Attached are the New Lab Charge Codes" DoCmd.SendObject acSendQuery, "std qry_Master to HPM Lab Standard Compare", acFormatXLSX, strTo, ,

Sending e-mails to multiple addresses with different pdf attachments

蹲街弑〆低调 提交于 2021-01-29 10:58:16
问题 I have an Access form with a command button that opens a report and creates .PDF files in a local folder. Each .PDF report has a different name (1234.pdf, 4321.pdf, etc.) The number represents the employee number and the report is that employee's current leave time balance. So basically, I end up with about 60 .PDF files in the folder, each one for a different employee. After creating these .PDF files, I'd like them to be e-mailed to each respective employee with their own .PDF attachment via

VBA Excel File staying open in the background

﹥>﹥吖頭↗ 提交于 2021-01-29 10:54:29
问题 I am currently using a module on Microsoft Access to Open an Excel file and paste the results into an email. The module is working properly, but the Excel file is remaining open in the background. This is causing an issue when I try to run the same module using the same file. The Excel file I am using also automatically updates a date field, so I also need the close call to save the file beforehand, or ignore the save changes pop-up. Public Function emailPaste(exFile As String, exSheet As

VBA: DoCmd Transferspreadsheet

心不动则不痛 提交于 2021-01-29 10:41:14
问题 Im trying to import an excel worksheet into Access table. Here is my code: Sub test2() Dim xlApp As Object Set xlApp = CreateObject("Excel.Application") xlApp.Visible = False Dim fd As Object Set fd = xlApp.Application.FileDialog(msoFileDialogFilePicker) Dim selectedItem As Variant If fd.Show = -1 Then For Each selectedItem In fd.SelectedItems Debug.Print selectedItem DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "POR", selectedItem, True, "POR Plan!A1:Z100" Next End If Set fd

Rename a field in access vba

≡放荡痞女 提交于 2021-01-29 10:19:37
问题 I need to rename a field name in VBA access code to automate things so it works faster. I am using a button to move some data around and need to change the column names, as a result, to clean things up. I am working out of a form but the table I need to change isn't linked to the form at all... I have tried using some VBA code but keep getting variables undefined errors like the tblFieldBookwslk50 is not defined Set db = CurrentDb Set rst = db.OpenRecordset("tblFieldBookwslk50", dbOpenDynaset

In Access VBA, how do I copy fields which consist of Attachments from single record to another table?

為{幸葍}努か 提交于 2021-01-29 10:02:22
问题 I tried using SQL but with no success. I then tried DAO, the other fields seems to work but the column which holds attachments fails. Has someone done this before? Private Sub copyfromtblA_Click() Dim db As Database Dim rs1 As DAO.Recordset Dim rs2 As DAO.Recordset Dim rs3 As DAO.Recordset2 'Set db = CurrentDb() Set rs1 = db.OpenRecordset("tblA") Set rs2 = db.OpenRecordset("tblB") With rs2 rs2.AddNew rs2.Fields("ItemNo").Value = Me.ItemNo.Value rs2.Fields("Quantity").Value = Me.Quantity.Value

How do i use Dlookup for Multiple Criteria to create a dynamic Combobox

我们两清 提交于 2021-01-29 09:43:07
问题 I have two Comboboxes on a from: txtKategorie and txtTyp. The values for the frist Combobox (txtKategorie) are fix! I want the values of the second Combobox (txtTyp) to change according to what the user chooses in the first one. If the user chooses "Datalogger" the second combobox should only contain "Base Layer Classic" and "Base Layer Plus" as can be seen in the image. The same idea is true for "Accelerometer". I've put my code in the AfterUpdate Event of the first Combobox: If txtKategorie

MS ACCESS The specified field [XXXXX} could refer to more than one table listed in the FROM

谁都会走 提交于 2021-01-29 09:12:13
问题 I'm getting the following error when trying to run a Query in MS ACCESS. The specified field "[XXXX}" could refer to more than one table listed in the FROM Clause of your SQL Statement. Not sure how to go about this error in MS Access. I'm very new in MS Access. SELECT Round([Revenue Amount]/[Quantity],2) AS [Rate Paid] FROM ([Profit Report] RIGHT JOIN ([HBMA 001] INNER JOIN [Key Report] ON [HBMA 001].ID = [Key Report].ID) ON ([Profit Report].[S Number] = [Key Report].[S Number]) AND ([Profit