MS Access: Caluclating Underlying Values from a Multi-Value Field
Stack Overflow » MS Access
by Catrina Jones
11m ago
I have a Member Database (MS Access) that tracks diet preferences. My table includes a multi-value field for each food group. Each food type has associated points, like the following: Vegetables Points Potatoes 1 Carrots 2 Celery 3 Onions 4 In my form, the user can identify the vegetables they prefer. When the user checks a box/boxes in the form, it goes to a Member Diet Preferences table. I want to be able to sum the total number of points and place the calculated value in a "Total" column. I'm not sure how to do this with a multi-value field ..read more
Visit website
Replacing data entries in MS Access Table with Input Box
Stack Overflow » MS Access
by Sheldon Cooper
4h ago
I am familiar but rusty with vba for excel but trying to apply what I know in an MS Access database with no luck. My table has the fields "Tool", "Color", and "Status". The goal is to change the status of a tool of a specific color from an inputbox. For example in the inputbox there will be 2 sections to input the Tool and color. (Ex Hammer, Blue) then with a click of the update button the corresponding status field entry changes from "Active" to "Inactive". Thanks in advance. I have tried referencing similar posts but excel macros and access macros are not 1:1 on the coding side which has lef ..read more
Visit website
Get all record source details for all forms in Access DB
Stack Overflow » MS Access
by Fatherjack
17h ago
I am in the process of splitting an Access database to move the data to a SQL Server. Application testing has found a form not loading due to the query syntax that supports the forms referencing Access tables not being compatible TSQL now the data is in the SQL database. I have resolved this one case but would like to iterate through all forms and where they have a query record source, review the query syntax for possible issues. How do I get the record source for all Forms please? So far I can use FOREACH to get all form names (below) but the form object doesn't appear to have a RecordSource ..read more
Visit website
Creating Module gives The command or action 'NewObjectModule' isn't available now
Stack Overflow » MS Access
by Jason
21h ago
I have an add-in that i have created with an add new module function. Here is the code: Public Function CreateModule(strModulename As String) Dim strModName As String 10 On Error GoTo err 20 DoCmd.RunCommand acCmdNewObjectModule 30 strModName = "Module1" 40 DoCmd.Save acModule, strModName 50 DoCmd.Rename strModulename, acModule, strModName 60 DoCmd.Save acModule, strModulename ExitHere: 70 Exit Function 80 err: Call LogError("CreateModule-Utils") End Function When i run it gives an error "The command or action 'NewObjectMod ..read more
Visit website
Select all unique values in SQL table with additional information
Stack Overflow » MS Access
by WhyteDem0n
1d ago
I'm trying to find the first SeqGrp and SeqNum of the first unique values TaxGroupCode. I had this query in a MS Access database (shown below), but we recently started using SQL Server 2008 instead. However, it seems FIRST isn't a valid function in T-SQL (at least in this version). SELECT FIRST(DesotoCoPA_Trims.SeqGrp) & "-" & FIRST(DesotoCoPA_Trims.SeqNum), "Tax District " & DesotoCoPA_Trims.TaxGroupCode AS Sample FROM DesotoCoPA_Trims GROUP BY DesotoCoPA_Trims.TaxGroupCode; This produces: GrpSeq Sample ----------------------- 2-28 Tax District 2 5-31 ..read more
Visit website
Use VBA to draw a box in a PDF file [closed]
Stack Overflow » MS Access
by Glenn B
1d ago
I have a pdf file (see image below) containing a chart with the chart data also displayed at the bottom. I need to use VBA to draw a red box around the data values in the bottom group that are >=40. The data to be enclosed starts in the row with the value 34. Loading the document into Word and saving as PDF when done is okay. I tried using the Acrobat SDK without success and need to use VBA to do so ..read more
Visit website
How to add user details to MS Word doc using mail merge from MS Access query based on network username
Stack Overflow » MS Access
by Matt Gilbert
3d ago
I have an MS Word document that I would like to populate with username details, namely; FirstName, LastName, PhoneNo, MobileNo & EmailAddress. I have an MS Access database that has a table called tblUsers with these fields plus a UserName field (FirstName.LastName). I have another table called tblProjects with project information. I have created an MS Access query that combines these 2 tables and has NetUser() as a criteria for the UserName field. NetUser code as follows; Function NetUser() Dim objNet Dim strUser As String Dim strDomain As String Set objNet = CreateObject("WScript.Net ..read more
Visit website
Clicking a button in another ms-access application via hWnd
Stack Overflow » MS Access
by przem
3d ago
I'm trying to write a piece of code in VBA that clicks a button in another access application. I know how to do it when the application is written, e.g. in C#, via Windows API, e.g. FindWindow and SendMessage. For the ms-access app, I can't find the button handle. In Spy++, the application window is visible, but its button components are not visible. How does ms-access handle buttons and how can it be done in VBA via Windows API ..read more
Visit website
Unable to Locate "Sheet1" in Excel File When Using pyodbc to Insert Data into MS Access
Stack Overflow » MS Access
by Adeel Ahmad
4d ago
I'm trying to insert data from an Excel file into an MS Access database using pyodbc, but I keep encountering an error stating that "Sheet1" cannot be found in the Excel file. Here's my Python import pyodbc filename = 'ALC_2022068_06282024-testing copy.xlsx' sql = r"""INSERT INTO tblALC_test ([dateofnotice], [provnbr]) SELECT e.[dateofnotice], e.[provnbr] FROM [Excel 12.0 Xml;HDR=Yes;Database={xl}].[Sheet1$] AS e; """.format(xl=filename) conn = pyodbc.connect(r'DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};' + r'DBQ=F:\Kevin\CPD_Night\AL ..read more
Visit website
I have the #Name! issue with new fields on one of my forms
Stack Overflow » MS Access
by user23561325
4d ago
I have Office16. A split database. I have added fields to a table that I want to place on an exiting form. The forms record source is a query of that table. I modified the query to include the added fields. I refreshed the table link in the front end. When I view the table I see the fields. I see them when I run the query. I see them in the field list of the form. The control sources for the fields are correct. When I add them I get the #Name!error. It is only the new fields that I have the issue. The form has a header and and a detail. The detail is where I am attempting to add the new fields ..read more
Visit website

Follow Stack Overflow » MS Access on FeedSpot

Continue with Google
Continue with Apple
OR