april522
New member
- Local time
- Today, 07:48
- Joined
- Feb 6, 2023
- Messages
- 7
I am at a loss. I am a very basic user of Access and probably don't use it the way most would. I have created several databases for various plant things I do (Dahlia tracker, Seed Stash, etc). I have just created a new database for 'Seed Starting Journal' where I want to keep records on seeds I start.
The form name is 'Seed Starting Journal.' I have a report I've created for 'Seeds Not Germinated.' This is where I am at a loss. I am using the below code (via Build Event). The goal is to click an item in the report and have it take me to that record in the form, in case I would like to update the record or edit it (hence the acFormEdit).
Private Sub Plant_Name_Click()
DoCmd.OpenForm "Seed Starting Journal", acNormal, , "id = " & Me.ID, acFormEdit
End Sub
The reason I am at a loss is I have used this exact code (after much googling and digging when I first figured out how to make it work) in my other databases I have set up. But for some reason, it does absolutely nothing in this new Seed Starting Journal database. No error code. I have spelled the form name correctly. The ID record is on the form (not visible, but it's not visible in any other databases where it works). It is the automatically generated numerical ID number for each entry in the form. I have even tried doing just this code:
Private Sub Plant_Name_Click()
DoCmd.OpenForm "Seed Starting Journal"
End Sub
Nothing. I go to my Report View and click on a plant name, and nothing. No error. It doesn't open the form at all. It's as if there is no coding. Can someone please help? I have even went in and did a "Compact & Repair" on the database. What am I missing?
The form name is 'Seed Starting Journal.' I have a report I've created for 'Seeds Not Germinated.' This is where I am at a loss. I am using the below code (via Build Event). The goal is to click an item in the report and have it take me to that record in the form, in case I would like to update the record or edit it (hence the acFormEdit).
Private Sub Plant_Name_Click()
DoCmd.OpenForm "Seed Starting Journal", acNormal, , "id = " & Me.ID, acFormEdit
End Sub
The reason I am at a loss is I have used this exact code (after much googling and digging when I first figured out how to make it work) in my other databases I have set up. But for some reason, it does absolutely nothing in this new Seed Starting Journal database. No error code. I have spelled the form name correctly. The ID record is on the form (not visible, but it's not visible in any other databases where it works). It is the automatically generated numerical ID number for each entry in the form. I have even tried doing just this code:
Private Sub Plant_Name_Click()
DoCmd.OpenForm "Seed Starting Journal"
End Sub
Nothing. I go to my Report View and click on a plant name, and nothing. No error. It doesn't open the form at all. It's as if there is no coding. Can someone please help? I have even went in and did a "Compact & Repair" on the database. What am I missing?