christine407
New member
- Local time
- Today, 05:16
- Joined
- Jan 18, 2021
- Messages
- 13
First, I want to say thank you to everyone/anyone who has read or responded to my past post. So helpful! Along the same lines, I’m very thankful for those who have answered other post as I am reading as much as I can.
I think I need help finding an example using pass through acFormEdit (I hope I'm using the right words here)?
I have a filtered form where the unique ID (well number) is displayed hyperlinked. When clicking the hyperlink well number, I want the user to be able to view and edit an associated form (frmWellReview).
Because I’m not totally sure that I’m using the right terms, I’ll provide an example. Let’s say I have a list of authors. I want the user to be able to click the hyperlinked author name and have it go to another form of books associated to the particular author (in form view, so the user only see information on one book at a time). The user can update the information on the book (ex: Name, publisher, ex) and/or the user can hit the > arrow button and review another book and/or add a new book (with the author name automatically being filled in) and hit save and save a record in tablebooks (or in my case tblWellReview). If the author has no books associated to it yet, I want the form to open to a blank form (with the author name already filled in).
Does anyone know of example code in a working access file that I can review?
I think I got something going on with the following code:
My current error with the following code is that it is asking for "Enter a parameter value" and prompting for the well number and not accepting the open argument?
Additionally, based on other post, I’m thinking maybe I should be using acFormEdit somehow (so I can work add multiple well reviews for one well). It is my hope that it will also auto fill in the well number when I add new (or if this is the first well review entered). I potentially want to carry over more than just the well number and maybe the location details on the frmWellReview but one step at a time.
Thank you again!
I think I need help finding an example using pass through acFormEdit (I hope I'm using the right words here)?
I have a filtered form where the unique ID (well number) is displayed hyperlinked. When clicking the hyperlink well number, I want the user to be able to view and edit an associated form (frmWellReview).
Because I’m not totally sure that I’m using the right terms, I’ll provide an example. Let’s say I have a list of authors. I want the user to be able to click the hyperlinked author name and have it go to another form of books associated to the particular author (in form view, so the user only see information on one book at a time). The user can update the information on the book (ex: Name, publisher, ex) and/or the user can hit the > arrow button and review another book and/or add a new book (with the author name automatically being filled in) and hit save and save a record in tablebooks (or in my case tblWellReview). If the author has no books associated to it yet, I want the form to open to a blank form (with the author name already filled in).
Does anyone know of example code in a working access file that I can review?
I think I got something going on with the following code:
Code:
Private Sub WellNumber_Click()
'WellNumber is the hyperlink unique ID
Dim WellID As String
'Some of the well numbers start with 0, so I couldn't use Long
WellID = Me!WellID
DoCmd.Close acForm, "frmWellSearch"
DoCmd.OpenForm "frmWellReview", OpenArgs:=WellID
End Sub
Private Sub Form_Open(Cancel as Integer)
'Opening of frmWellReview
If nz(Me.OpenArgs) = 0 Then
me.RecordSource = "tblWellReview"
Else
me.RecordSource = "Select tblWellReview.* FROM tblWellReview WHERE (((tblWellReview.Well_Number) =" & me.OpenArgs & "));"
End If
End Sub
My current error with the following code is that it is asking for "Enter a parameter value" and prompting for the well number and not accepting the open argument?
Additionally, based on other post, I’m thinking maybe I should be using acFormEdit somehow (so I can work add multiple well reviews for one well). It is my hope that it will also auto fill in the well number when I add new (or if this is the first well review entered). I potentially want to carry over more than just the well number and maybe the location details on the frmWellReview but one step at a time.
Thank you again!