ms-access

Alternative to Access Printer object in Excel VBA

两盒软妹~` 提交于 2021-01-29 09:01:12
问题 I am trying to send raw data (ZPL) to a selected printer in Excel VBA. I have done this successfully in different Ms Access projects, but now I need the same functionality in an Excel project. I am able to use the same code by referencing the Access object library in my Excel VBA project and it works as expected. The problem is that the workbook can later be used on computers without Access installed, and I can't find the alternative objects. Private Type DocInfo pDocName As String

How to save row values from one field in subform to main form record? - Access

ぐ巨炮叔叔 提交于 2021-01-29 08:47:03
问题 I have a parent form (frmGroupSession) that has a subform (SubFormParticipants) in datasheet view. The subform is based off a query that selects all participants ([CLIENT ID], [NAME], [ATTENDED]) that had attended a specific group [GroupID] on a specific date [GroupSessionDate]. The parent form saves to a table that logs group sessions (tblGroupSessionLog). I need to save the group's participants [CLIENT ID] to the record within tblGroupSessionLog Basically, I need to pass data from the

Cascading Combo Boxes - Dependent Box is Blank

空扰寡人 提交于 2021-01-29 07:56:02
问题 I have a table called POHeader, which shows PO Numbers and the Vendor Number for the provider, as well as other data points for each PO. Sometimes, we exempt a specific PO from all of our delivery rules, and I created an Access form to store these exemptions. Right now, there are two combo boxes, one for PO Number and one for Vendor Number, on the form. I want the Vendor Number combo box to filter to only vendors who match the PO Number selected by the user (PO numbers may not be unique in

Postgresql syntax in ms access

独自空忆成欢 提交于 2021-01-29 07:21:01
问题 I was reading this link: Does PostgreSQL support "accent insensitive" collations? about how to use accent insensitive queries. and this link PostgreSQL: How to make "case-insensitive" query about using case insensitive queries. Tested a query in pgAdmin: SELECT * FROM Customers WHERE unaccent(Customers.customername) ILIKE unaccent('abc%') and it works fine. It gives me the expected results. However, my front end is in MS Access 2016, is there a way to send this query to Postgres from within

Access VBA Preventing form record entry on close

↘锁芯ラ 提交于 2021-01-29 06:20:52
问题 I am working with Access Database VBA. I have noticed if a user has filled a few of the text boxes in and then clicks the windows close button, the form logs that into the records. I am wondering what is the best way to prevent the form from entering the uncompleted record on close? There were a few sites pointing to placing a code in the beforeupdate function. This is what I have tried. Private Sub frmRecLog_BeforeUpdate(Cancel As Integer) DoCmd.SetWarnings False Me.Undo Cancel = True Exit

Selecting additional data/values to display as column in query or in form

这一生的挚爱 提交于 2021-01-29 06:10:29
问题 I have an employee index, that I need to run queries on for each employee, and display that output along with the original employee. So say the employee index has an ID, batch, status, and multiple other columns. I have a table where I keep track of every time a column in the employee index changes. I want to display and later export dates of when certain columns use to equal other values, right along side the original employee row. Naturally I tried creating a form to display multiple value,

What am I missing in my approach to add new records to my database in VB.NET Applicaton?

徘徊边缘 提交于 2021-01-29 05:41:49
问题 I have a data table (Named "Effects") from Access in my VB.Net Userform. I have two buttons (AddEffect.Click and SaveEffect.Click) that use ADD NEW , END EDIT and UPDATEALL . This works whilst the app is open. A new record appears in the GRIDVIEW with the Data I inputed into the various textboxes. Private Sub AddEffect_Click(sender As Object, e As EventArgs) Handles AddEffect.Click Me.EffectsBindingSource.AddNew() End Sub Private Sub SaveEffect_Click(sender As Object, e As EventArgs) Handles

Toggle visibility of other fields on form based upon combobox selection - MS Access

怎甘沉沦 提交于 2021-01-29 05:33:52
问题 Question... How can I toggle the visibility of several other fields (checkboxes/textboxes) on form based upon the selection of a combobox item. The image below shows a listbox but either way, how do use vba code to turn on or off visibility of all the fields in the grey box. Basically, if the combobox selection is scheduled then visible=true. Else visible=false How can I code this??? 回答1: Use combobox AfterUpdate event and probably form Current event as well. So build a procedure that can be

Error executing a MS Access macro from Python

若如初见. 提交于 2021-01-29 05:27:04
问题 I'm trying to run a macro from Python. Said macro works fine when executed from Access itself, but I'm trying to do it with the following Python code (handily stolen from How to run a MS Access macro from python): from win32com.client import Dispatch access_obj = Dispatch("Access.Application") access_obj.Visible = False access_obj.OpenCurrentDatabase("my_database_file.accdb") access_obj.DoCmd.RunMacro("my_macro") access_obj.DoCmd.CloseDatabase() Executing the penultimate line ( ...RunMacro(

Open Access form to a specific page on a tab control on a different form with VBA

风流意气都作罢 提交于 2021-01-29 04:12:15
问题 I have created a help index on a tab control with 60 pages. Each page contains helpful information to the question that corresponds to the page. The questions that are being answered are on a different form from the tab control form. I have created a button next to each question so that the user can access the help form if they need background and instructions for completing each question. I am trying to write code that will open the form and go to the correct page based on the button that