I did what you said Eupher and added the Dim myrecordsource As String in at the start too but after testing it, all the boxes appear with #Name? in them??
ive posted the file if anyone would like to look at it
Go to search for a cd from the main menu (ignore the reset button for now)
http://homepage.ntlworld.com/l337.h4x0r/benjie/CD%20Directory.zip
I am not using a query, just the FindRecord function as shown above.
the subform Main_Subform1 recordsource is:
SELECT [Main].[ID], [Main].[Software_Title], [Main].[Category_ID], [Main].[Company_ID], [Main].[Version], [Main].[Location], [Main].[Quantity] FROM Main WHERE...
the search reults need to be displayed in the subform which is on the main form rather than after hitting the command button a new form with the results opening up. on the main form (Form1) i have a couple of combo boxes which work fine with the subform (Main_Subform1) and an unbound text box...
I kind of get what you mean but i am not trying to open a separate form. Just display all the results from the search function in the subform (Main_Subform1) on the main form (Form1) rather than opening up a new form with the results in.
I tried putting
Private Sub Form_Open(Cancel As...
If you want to use a txt box linked to the search button to display records in the subform depending on what you have typed then have a look at this thread.
I'm stuck trying to display the records but the search function works albeit loading another form at the moment!
thread702-649339
This is the code under the event click function of my command button "cmdsearch". The main form is called "Form1" and the subform displaying the records is called "Main_Subform1" The text box which the user enters text is named "txtsearch".
Private Sub...
I have the same kind of problem although with my DB it opens a form rather than a query.
' open results form if records found, otherwise return false
If lngCount = 0 Then
ExecuteSearch = False
Else
ExecuteSearch = True
DoCmd.ShowAllRecords
DoCmd.OpenForm...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.