H
hje
Forgive me if I dont speak the Access lingo as I describe
my problem - fairly new user here!
I have a button on my form, that once clicked, provides a
query screen. The query results are displayed in a form.
My concern is, that the results from the query need to be
displayed in the same form as the one that instigated the
search.
For example, the user is doing data entry into the
form "forma". They need to lookup another record. On
forma I created a command button that launches a query
form "search_item". The results of the query are
displayed in the form "forma".
The above scenario should be able to chain, such that when
a user needs to search records, the display is in the same
form and editable.
The code I have for button is as follows:
Private Sub search_item_button_Click()
On Error Go To Err_search_item_button_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Search_item"
DoCmd.OpenForm stDocName,,,stLinkCriteria
Exit_search_item_button_Click:
Exit Sub
Err_search_item_button_Click:
MsgBox Err.Description
Resume Exit_search_item_button_Click
End Sub
Obviously, this does not work, since once the query is
finished, the form already exists and is open.
Any suggestions on how I can have multiple instances of
the same form open and available for editting? Or am I
looking at a non-doable thing? If so, I would welcome
suggestions on how to work around what the user is trying
to achieve.
my problem - fairly new user here!
I have a button on my form, that once clicked, provides a
query screen. The query results are displayed in a form.
My concern is, that the results from the query need to be
displayed in the same form as the one that instigated the
search.
For example, the user is doing data entry into the
form "forma". They need to lookup another record. On
forma I created a command button that launches a query
form "search_item". The results of the query are
displayed in the form "forma".
The above scenario should be able to chain, such that when
a user needs to search records, the display is in the same
form and editable.
The code I have for button is as follows:
Private Sub search_item_button_Click()
On Error Go To Err_search_item_button_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Search_item"
DoCmd.OpenForm stDocName,,,stLinkCriteria
Exit_search_item_button_Click:
Exit Sub
Err_search_item_button_Click:
MsgBox Err.Description
Resume Exit_search_item_button_Click
End Sub
Obviously, this does not work, since once the query is
finished, the form already exists and is open.
Any suggestions on how I can have multiple instances of
the same form open and available for editting? Or am I
looking at a non-doable thing? If so, I would welcome
suggestions on how to work around what the user is trying
to achieve.