vba
89 TopicsAccess Releases 6 Issue Fixes in Version 2209 (Released September 26)
Our newest round of Access bug fixes was released on September 26. In this blog post, we are highlighting some of the fixed issues that our Access engineers released in the current monthly channel build 2209.6.9KViews4likes1CommentAccess fixes released in Version 2410
Initial release Version 2410 (Build 18129.20116). Bug Name Issue Fixed Memory leak when using the Properties collection in VBA code Every time there was a reference to the Properties collection (e.g. obj.Properties("Text")) in VBA code, Access would leak memory. If this was done a large number of times, the memory usage of Access could increase significantly. Please continue to let us know if this is helpful and share any feedback you have.807Views3likes0CommentsAccess fixes released in Version 2603 (Build 19822.20114)
Here's a summary of bug fixes in the latest version of Access: Bug Name Issue Fixed Edge Browser Control didn't navigate from code when inside a tab control When the Edge Browser control was hosted in a tab control, calls to the Navigate method from VBA succeeded, but the control didn’t refresh to show the new page. Switching tabs forced the refresh. The control now refreshes automatically after navigation, even when it’s hosted in a tab control. Some Unicode characters displayed incorrectly in Quick Import Certain extended Unicode characters were displayed as squares when importing data using Quick Import. These characters are now displayed correctly. Modern Chart titles truncated in Print Preview When viewing a report containing Modern Charts in Print Preview, chart titles might be truncated. Chart titles now render correctly in Print Preview. Some Unicode characters displayed incorrectly in exported object names When exporting an object whose name contained certain extended Unicode characters, the sheet name in the exported file displayed the characters incorrectly. These characters are now preserved correctly during export. Some Unicode characters displayed incorrectly in error messages for long object names When renaming a database object to a name that was too long, the error message displayed certain extended Unicode characters incorrectly. These characters now display correctly in error messages. Standard colors in Access didn't match other Office apps The standard color palette in Access used different color values than other Office applications like Word and Excel. For example, the standard red in Access was #ED1C24 instead of the updated Office standard red #EE0000. The color palette has been updated to match the rest of Office. Field.Properties("Precision") and Properties("Scale") on a query column caused the query to execute Accessing the Precision or Scale properties of a field in a query's Fields collection caused the query to execute. This was a regression that broke add-ins and code that enumerate field properties, since query execution can be expensive and have side effects. These properties are now returned without executing the query. Toggle filter button in status bar didn't work when no records were displayed When a form filter resulted in no matching records, clicking the Toggle Filter button in the status bar to remove the filter had no effect. The button now properly removes the filter even when the filtered result set is empty. PDF files with capitalized extension didn't render in Edge Browser Control When navigating to a PDF file using the Edge Browser control, if the file extension was capitalized (e.g., ".PDF" instead of ".pdf"), the file contents were rendered as raw text instead of as a formatted PDF document. The extension comparison is now case-insensitive. Monaco SQL editor inserted blank lines in multi-line comments When switching between Design View and SQL View, the Monaco SQL editor inserted blank lines between each line inside /* multi-line comment */ blocks. This affected both local and passthrough queries. The editor now preserves the original comment formatting. Please continue to let us know if this is helpful and share any feedback you have.635Views2likes2CommentsWhat does the "sourcedoc" part of a SharePoint filepath represent?
Hi all, I've been working on opening sharepoint files with VBA (reference PowerPoint decks via a ribbon button). I'm using "Application.ActivePresentation.FollowHyperlink SharePointPath" which is working fine. The constant SharePointPath is the direct SharePoint link for the files I want, which takes this form: https://tenant.sharepoint.com/:p:/r/sites/sitecollection/_layouts/15/Doc.aspx?sourcedoc=%7BB60C7EC5-A285-4BC7-9B0B-B98A148A26D7%7D&file=filename.pptx I've been testing different combinations of replacing the file in place, changing the filename, etc. to see how this can be broken and have noticed a strange behaviour. When I: - Uploaded a different file to the same folder - Deleted the original file - Renamed the new file to the filename of the old file I got a different "sourcedoc" (the bit in blue), however, the original link still worked. To play out the example: - I uploaded a file, which had this path https://tenant.sharepoint.com/:p:/r/sites/sitecollection/_layouts/15/Doc.aspx?sourcedoc=xxxxxx&file=originalfilename.pptx (this path was put in the constant "SharePointPath" in VBA) - I uploaded a new file, which had this path https://tenant.sharepoint.com/:p:/r/sites/sitecollection/_layouts/15/Doc.aspx?sourcedoc=yyyyyy&file=newfilename.pptx - I renamed the new file to the filename of the original file, which then had this path https://tenant.sharepoint.com/:p:/r/sites/sitecollection/_layouts/15/Doc.aspx?sourcedoc=yyyyyy&file=originalfilename.pptx - Then tried "Application.ActivePresentation.FollowHyperlink SharePointPath" WITHOUT updating SharePointPath (so the path was the xxxxxx path) and it still successfully opened the new file. So my question is, what is that "sourcedoc" reference? What does it represent and why didn't it matter that I changed it? I have seen it is a "document_GUID" but not clear on how it works why it didn't matter that it changed9.1KViews2likes2Comments'Calling' a function from within a Word document
I know this is probably really basic but this will be my first real dive into Word VBA, I am quite experienced in Excel VBA, though. I am having difficulty getting my head around how Word 'knows' that a 'block of text' is code, rather than just text of the document. As my first 'excursion', within Word VBA, I am seeking to split a phrase, when it is passed, through mail merge, from an Excel spreadsheet to a Word document. With apologies for i. the fact that my interface to this forum does not permit me to see all the proper formatting options for code and ii. the following is more of a 'storyboard' version of code, rather than the proper thing. The relevant Excel spreadsheet is used to support a group of mail merge letters and this 'issue' is only relevant to one letter, so I do not wish to redesign the spreadsheet; I would prefer to handle the 'issue' within Word, through VBA code. I will focus on two mail merge fields, within this question. The 2 mail merge fields are called, for the sake of simplicity here, i) Relative_Name and ii) Relative_Relationship. Relative_Relationship contains, for example, the value "Second Cousin Twice Removed of the Husband of my Second Cousin Once Removed", and, just to make up a name, Relative_Name contains "Walter Gerard Montague". Now when I simply include the fields in the other letters I simply type - Based on reviewing the online tree which has brought you to my attention, I can see that your tree includes «Relative_Name». Your relationship to me: «Relative_Relationship». and I would end up with a final merged text that reads - Based on reviewing the online tree, which has brought you to my attention, I can see that your tree includes Walter Gerard Montague. Your relationship to me: Second Cousin Twice Removed of the Husband of my Second Cousin Once Removed. On this occasion, though I want to split the contents of the field Relative_Relationship into two halves, through passing it to a VBA macro, so that I would end up with - Based on reviewing the online tree, which has brought you to my attention, I can see that your tree includes Walter Gerard Montague. Walter Gerard Montague is the Husband of my Second Cousin Once Removed and you are his Second Cousin Twice Removed. Now for the sake of the following let's call the VBA function, which I propose to write, Relationship_Phrase_Split. Now here is the nub of my question, how does Word know I am invoking the subroutine when I write, in the mail merge document, something that maybe looks like - Based on reviewing the online tree, which has brought you to my attention, I can see that your tree includes «Relative_Name». Relationship_Phrase_Split(«Relative_Relationship», maybe some other fields from the Excel spreadsheet to control how the splitting is done, e.g. «Gender»). I have only italicised, in the above, just to highlight where I am needing assistance to understand how to cause Word to process the code. I am not asking for help on the split function, only the correct syntax for calling it, please. I have made the document a .docm extension. With thanks in anticipation. Philip Bendigo, VioctoriaSolved4.2KViews1like2CommentsAccess selecting specific date on a calendar
I'm pulling my hair out because everything I've found through my research says my VBA code should work, but it doesn't! Here's the story. I have a calendar (form) that shows events going on for each month. What I want is for a person to click on a specific day and have a pop-up form appear showing more details of the events for whatever day they clicked on. I used the below code, which mostly works... When I click on a date, the month and year will be correct, but not the day of the month. The day of the month is always today's day. For example, let's say I click on the day Feb. 2, 2024 and today's date is May 21, 2026. My pop-up form will show the events for Feb. 21, 2024. This is the code I have: Private Sub lblTue3_Click() Dim txtSelectDate As Date (probably don't need this) Dim iDayOfMonth As Integer Dim iMonth As Integer Dim iYear As Integer Dim dSelectDate as Date iDayOfMonth= Format(Me.txtSelectDate.Value, "d") iMonth = Format(Me.txtSelectDate, "mm") iYear = Format(Me.txtSelectDate, "yyyy") dSelectDate = CDate(iMonth & "/" & iDayOfMonth & "/" & iYear) DoCmd.OpenForm "frmThatContainsMyData", acNormal, , "[DateOnFormUsedForFilter]=#" & dSelectDate & "#", , acDialog Update: I think I figured out where the problem is. When the calendar form is loaded, that's where txtSelectDate is defined. However, I don't know how to define txtSelectDate to whatever date I click on in the calendar. It defaults to today's date when I load the form. When I change the month or year, those number change in the txtSelectDate box, but not the day. This is the code I currently have. (DisplayMonthName displays the month and year; don't think it's part of my issue) Private Sub Form_Load() Me.txtSelectDate = Date Call DisplayMonthName End Sub Any help is greatly appreciated!176Views1like11CommentsPrinting based on Cell value - VBA???
Hello All - first time post. Not a rookie to Excel, but no expert either. I am stuck trying to automate a print function. I have a table which is 4 columns as follows: Full Name | Rating | Comments | Performed By In the "Preformed by" field, i have my staff, and there are repeats of staff. So this column (column D) has repeats of "John Smith" (3x), Sam Jones (4x), Mike Adams (1x). Each of the other columns, while there may be repeating information, should be treated as independent data (so a name of Sue Smith, which may repeat once or twice is not related to the important column of "Performed By"). I want to print each range of values for a particular staff person on an individual page (or pages if necessary) to hand out to that person individually. So is staff person John Smith has 5 reviews, that the customer name, the rating and comments all print on a single page, in a table format in the same manner as though I manually selected that range of values and printed using the "Print Selected" function. I have attached a sample spreadsheet to demonstrate. I need each staff person's reviews, customer name and rating to print on a single page based on the staff persons name. ONE CLICK or FUNCTION I have 30 staff, each with more than a few ratings to print for them, so I am looking for a way to automate this in some way, and I figure VBA is probably the best option..? I am open to providing more input as needed. Feel free to ask. Thanks so Much Justin Michigan4.9KViews1like4Comments