ms-access

How to sum for a parent/child relationship in MS Access

天大地大妈咪最大 提交于 2020-01-16 20:05:25
问题 I have a number of Matters which are in a parent/child relationship. Each has a pointer to their parent matter, or null if they are the parent. Each matter can have a payment made, but all payments in a parent/child relationship are shared between both parent and child. A simplified version of my tables is: Matter | ID | Value | ParentID | -------------------------------------- | 1 | 200 | 0 | | 2 | 200 | 1 | | 3 | 300 | 0 | | 4 | 200 | 1 | | 5 | 800 | 0 | Payment | ID | Value | MatterID | --

VBA to copy one worksheet to multiple other worksheets in MS Access

旧时模样 提交于 2020-01-16 19:38:11
问题 I am looking to copy an existing (already created worksheet) into about 500 workbooks (*.xlsx) that all reside in the same folder. Another user (@tigeravatar) was able to generate the below code that could be utilized in MS Excel but they asked me to open up another question since I didnt clarify my desire to use it in MS Access. My rudimentary knowledge of VBA tells me I need to to do something like 'Dim ObjXL As Object and then Set ObjXL = CreateObject("Excel.Application") but beyond that I

VBA to copy one worksheet to multiple other worksheets in MS Access

烈酒焚心 提交于 2020-01-16 19:36:45
问题 I am looking to copy an existing (already created worksheet) into about 500 workbooks (*.xlsx) that all reside in the same folder. Another user (@tigeravatar) was able to generate the below code that could be utilized in MS Excel but they asked me to open up another question since I didnt clarify my desire to use it in MS Access. My rudimentary knowledge of VBA tells me I need to to do something like 'Dim ObjXL As Object and then Set ObjXL = CreateObject("Excel.Application") but beyond that I

Move/copy a folder with its children to Livelink

你。 提交于 2020-01-16 19:11:59
问题 I'm already using the following code to copy a file to Livelink: Public Function saveFileLL(target As Long, pathSource As String, fileName As String) As Boolean Dim dav As New ADODB.Record Dim files As New ADODB.Recordset Dim objStream As New ADODB.Stream Dim url As String If Not Val(Nz(target, 0)) > 0 Or Not pathSource Like "*.*" Or Not fileName Like "*.*" Then saveFileLL = False Exit Function End If url = URL_LIVELINK_DAV & target dav.Open url, , adModeReadWrite Set files = dav.GetChildren

Display all records from query on form

不打扰是莪最后的温柔 提交于 2020-01-16 18:34:18
问题 When I made a query, first only records with entries in all of the related tables where showing. I was able to change this behavior by changing the join properties (to a left join). I want the same behavior for the form: all of the records should be accessible through the form. However, I don't find a way to change the join-type for forms. How can this be done? 回答1: In your query designer, double click the line that represents the join, it should give you a button called Join Type or

Display all records from query on form

纵饮孤独 提交于 2020-01-16 18:33:06
问题 When I made a query, first only records with entries in all of the related tables where showing. I was able to change this behavior by changing the join properties (to a left join). I want the same behavior for the form: all of the records should be accessible through the form. However, I don't find a way to change the join-type for forms. How can this be done? 回答1: In your query designer, double click the line that represents the join, it should give you a button called Join Type or

Help with Delphi 7, ADO, & MS Access SQL Statement

老子叫甜甜 提交于 2020-01-16 18:26:09
问题 I have three tables (in a MS Access Database 2000 file *.mdb) Knowledge id question answer Knowledge_Keywords id knowledgeid keywordsid Keywords id keyword Need to get all the keywords for a knowledge Select distinct keyword from keywords KW Join knowledge_keywords KKW on KKW.keywordid = KW.id Join Knowledge K on K.id = KKW.knowledgeid Where k.id = 10 of course 10 is a example, i actually use a parameter there Where k.id = :AKnowId'; and fill it in in code qry.Parameters.ParamByName('AKnowId'

Access 2016 VBA unable to set button click on form to write multi-value fields to second table

孤街醉人 提交于 2020-01-16 17:05:31
问题 I am building an application to track time amongst project, employees, etc. The company I work for has significant security red tape, so I have to use MS Access 2016, I am barred from youtube to search solutions, and I cannot download any files from the internet. Luckily, I can still access StackOverflow. I have an entry form ("Task_List_Entry_Form") that has a button. On click, the button sends values to a table ("tbl_Task_List"). In the form VBA I've included that the table ("tbl_Task_List"

Access 2016 VBA unable to set button click on form to write multi-value fields to second table

一笑奈何 提交于 2020-01-16 17:03:17
问题 I am building an application to track time amongst project, employees, etc. The company I work for has significant security red tape, so I have to use MS Access 2016, I am barred from youtube to search solutions, and I cannot download any files from the internet. Luckily, I can still access StackOverflow. I have an entry form ("Task_List_Entry_Form") that has a button. On click, the button sends values to a table ("tbl_Task_List"). In the form VBA I've included that the table ("tbl_Task_List"

ms-access - how to automatically select yes in warning message boxes

走远了吗. 提交于 2020-01-16 15:46:33
问题 in ms-access i am running a macro that runs several queries, during the execution of a query a message box appears "you are about to run an update.......... are you sure you want to run this query ? " how can i automatically select for all such cases so that macro runs without human intervention. 回答1: You can turn off temporary the warnings like this: DoCmd.SetWarnings = False DoCmd.RunSQL ... DoCmd.SetWarnings = True 回答2: It is generally best to use Execute in such cases in order to trap