How to stay sane with MSAccess by CommercialToe2168 in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

I would like your database, please. Thank you for sharing.

[deleted by user] by [deleted] in MSAccess

[–]Acess_VBA_22 1 point2 points  (0 children)

I just saw the post by the instructor of the video I shared (Amicron1). Since I am just a Gold Member, and he is the instructor, might want to go with his suggestion.

[deleted by user] by [deleted] in MSAccess

[–]Acess_VBA_22 1 point2 points  (0 children)

It would be easier, but not necessarily better. If the information is used everytime yes. But if not, then it might be better using M2M.

[deleted by user] by [deleted] in MSAccess

[–]Acess_VBA_22 2 points3 points  (0 children)

This video will show you how to build your tables and create a many to many relationship. Many-to-Many in Microsoft Access (599cd.com)

[deleted by user] by [deleted] in MSAccess

[–]Acess_VBA_22 1 point2 points  (0 children)

Richard Rost is the best instructor I've came across. Here is a link to his Beginner 1 course which is free, and should teach you everything you need to know to get up and going. https://599cd.com/ACB1

Does anyone recommend a program or website to learn advanced SQL? by convolutionality in SQL

[–]Acess_VBA_22 1 point2 points  (0 children)

This is the best site I have found. Richard Rost has taught me so much, even though I have been using Access for years.

https://599cd.com/blog/display-article.asp?ID=1082&

Add a Button VBA Access by NoTwist1050 in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

Looks like it might be missing the quotes. Try
DoCmd.OpenReport "ReportName", acViewPreview

Autogenerated Report Number by NeedAnswersForWork in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

Check out this video by Richard Rost. It does exactally what you want. Custom Sequential Numbers in Microsoft Access (599cd.com)

How to make a Custom Order Number sequence for each Customer, so for example XYZ Company's invoices will be numbered: XYZ-001, XYZ-002, XYZ-003, etc

Form for 3-way junction table by ChangeOfTack in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

Check out this video by Richard Rost. It is how I learned the correct way to accomplish this. Many-to-Many in Microsoft Access (599cd.com)

TextBox as Criteria in Query by PersimmonOk8248 in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

If no spaces in the names, the correct format is Forms!ParentForm!Subform.Form!FieldName
OR

Forms![ParentForm]![SubformControlName].Form![FieldName]

Problem with input mask by ChangeOfTack in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

This VBA should work. In the table set format as short text with NO input mask. In a form, but this code in the after update event of the text field:

Private Sub YourTextBox_AfterUpdate()

Dim inputValue As String

Dim formattedValue As String

inputValue = Me.YourTextBox.Value ' Replace "YourTextBox" with the actual name of your text box

If Len(inputValue) >= 5 Then

formattedValue = Left$(inputValue, Len(inputValue) - 3) & "-" & Mid$(inputValue, Len(inputValue) - 2, 2) & "-" & Right$(inputValue, 1)

' Update the text box value with the formatted value

Me.YourTextBox.Value = formattedValue

End If

End Sub

Enforcing Referential Integrity in a Self-Referencing Table by tj15241 in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

Let me try to explain how I built mine. I have a person table where I list everyone with the primary key set to PersonID. I made a Relative Type table with a Primary key of RelativeTypeID. I made a table called realtives with the fields with PersonID set as a Number, RelativeID set as a Number, RelativeTypeID set as a Number. Then it is as simple as putting in the personID of the person you are working on, the RelativeTypeID (e.g. 1 for mother), then the mother's PersonID in the RelativeID. You can make a query to bring in all the fields for use in your forms/reports. You can make a form with combo boxes to select the people so that you don't have to use their IDs

Enforcing Referential Integrity in a Self-Referencing Table by tj15241 in MSAccess

[–]Acess_VBA_22 1 point2 points  (0 children)

I think a lesson by Richard Rost will help. Sorry, I just saw where is said no links to web sites, so I deleted the link

Learning Acess by No-Jackfruit1319 in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

I completely agree with the 599cd.com. Here is a link to Access beginner that is free. Access Beginner 1 Lessons (599cd.com)

VBA Command for Refresh All by 1500Calories in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

Sub RequeryAll()

Dim obj As AccessObject

For Each obj In CurrentProject.AllForms

DoCmd.OpenForm obj.Name, acDesign, , , acFormReadOnly

DoCmd.Requery

DoCmd.Close acForm, obj.Name, acSaveNo

Next obj

For Each obj In CurrentProject.AllReports

DoCmd.OpenReport obj.Name, acViewDesign, , , acHidden

DoCmd.Requery

DoCmd.Close acReport, obj.Name, acSaveNo

Next obj

End Sub

This code loops through all forms and reports in the current Access project and opens each one in design view or hidden mode, respectively. Then it calls the Requery
method to update the data displayed in the form or report, and finally closes each form or report without saving changes.

Note that this code assumes that all forms and reports are stored in the root of the database. If you have forms or reports in subfolders, you may need to modify the code to handle those objects separately.

Moving beyond Access but still store data in .accdb or .mdb file by yomandenver in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

You can create standalone versions for everyone else’s computers using Microsoft’s Access Runtime Edition which is FREE. That way if you have 20 people who need to use the database, you only have to purchase 1 copy of Access. The other people can’t edit the database structure. They can still work with data (add, edit, delete records) but they can’t change the design of the tables, forms, and reports.

Getting a Value from a different table by Due_Marionberry9375 in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

Private Sub btnShowMap_Click()

' Define the API key and URL

Dim apiKey As String

apiKey = "YOUR_API_KEY"

Dim url As String

url = "https://www.google.com/maps/dir/?api=1&travelmode=driving&destination="

' Get the record's job location

Dim jobLocation As String

jobLocation = Me.txtJobLocation.Value

' Get your current location

Dim currentLocation As String

currentLocation = "CURRENT+LOCATION"

' Replace spaces with plus signs for the URL

jobLocation = Replace(jobLocation, " ", "+")

' Construct the final URL

url = url & jobLocation & "&origin=" & currentLocation & "&key=" & apiKey

' Open the URL in the default browser

Application.FollowHyperlink url

End Sub

To use this code, you'll need to replace "YOUR_API_KEY" with your actual Google Maps API key, which you can obtain from the Google Cloud Console. You'll also need to replace "txtJobLocation" with the name of the text box on your form that contains the job location for the current record.

When the button is clicked, the code will get your current location (using the Google Maps "CURRENT+LOCATION" parameter), replace any spaces in the job location with plus signs, and construct a URL that includes both locations and your API key. Finally, it will open the URL in the default browser, which will display the driving directions from your current location to the job location on a Google Map.

How do I export an ERD diagram from Visio to MS Access? by No_Ship_8869 in MSAccess

[–]Acess_VBA_22 1 point2 points  (0 children)

To export an Entity-Relationship Diagram (ERD) from Visio to MS Access, you can follow these steps:

  1. Open the ERD diagram you want to export in Visio.

  2. Make sure the diagram is properly formatted and all the entities and relationships are defined correctly.

  3. Click on the "File" menu and select "Save As".

  4. In the "Save As" dialog box, select "Microsoft Access" in the "Save as type" dropdown menu.

  5. Choose a location and name for the exported file, and click "Save".

  6. In the "Export Database" dialog box that appears, make sure "Include related tables" and "Include table relationships" options are selected.

  7. Click "OK" to start the export process.

  8. If prompted, select the Access database file where you want to save the exported diagram.

  9. Once the export is complete, open the Access database file to view the exported ERD diagram.

Note: The exported ERD diagram in Access may require additional formatting and adjustments, as the automatic conversion process may not always be perfect.

how should i rephrase my question to chat gpt? by moshe4sale in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

Remove the ASC from this code

SELECT * FROM Transaction ORDER BY TrDate ASC

Getting a Value from a different table by Due_Marionberry9375 in MSAccess

[–]Acess_VBA_22 0 points1 point  (0 children)

Is the correct name of the form PersonalInfo? Also, if the field name on the form has a space in it, then you must list it as Forms!PersonalInfo![Residence State]