Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2007
    Posts
    81

    Unanswered: I can not activate the search box, it was Deficit,

    Hi

    In this post I upload sample. I can not activate the search box for FirstName, it was Difficult to make it. I need your help.

    open TeacherStudentSubFrm, please activate FirstName seach box.

    thanks
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    You need to go back to your query and put [Forms]![TeacherStudentSubFrm]![YourControlName] into the criteria field.
    Ryan
    My Blog

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I see SAMI2 that you've completely ignored the very easy code sample I supplied to you. And you haven't even looked at it!! The way you're doing it in this upload is simply not a good way to do it and I'd highly recommend you look at the example I uploaded to you which does EXACTLY what you want it to do.

    Here AGAIN, is the link to the upload sample I provided to you TWICE! http://www.dbforums.com/showpost.php...08&postcount=7

    PLEASE download the zip file in this post, extract it and take a look at it!!!!!! (I left the database name the same in the zip file so extract it to a different folder so you don't overwrite your db and open and LOOK AT IT!) It does EXACTLY (I mean EXACTLY) what you want it to do!

    I took the time to configure it (with VERY easy 4 lines of code) to work using YOUR database and it would be polite for you to at least take a look at it! It's very frustrating when we take the time to answer your questions (and even supply you with an EASY solution in YOUR own database) and you don't even look at it.

    Here is the upload again in case you don't want to go to the post!
    Attached Files Attached Files
    Last edited by pkstormy; 07-19-07 at 13:47.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Apr 2007
    Posts
    81
    Hi pkstormy

    I am very sory a bout that, but I do not want combo box I need textbox for search. if you can solve it please I need your help.

    Hi rguy84
    I can not go to the design of qryTeachersStudents, please open it to see what can I do.

  5. #5
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Why cant you? I opened it up just fine.
    Ryan
    My Blog

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Look At This!

    SAMI2,

    Here! LOOK AT THIS ATTACHMENT, DOWNLOAD IT, UNZIP IT AND LOOK AT THE CODE!

    I've revised it to do EXACTLY what you want it to do. This will be the last time I change this (I'd still recommend you go back to the way you had it as I think splitting the tables is a work-around for something which has already been given to you as a solution.) It's NOT a good alternative! If you split the tblUsers into 2 tables, then you're going to need 2 subforms for the MainFrm and have a search box which tells it which subform you want to show. This example has the one tblUsers which is a better solution but you can apply the same concept if you want to utilize 2 tables and 2 subforms. It opens the Teacher form or Student form depending on whether Teacher is marked as true which is BETTER than splitting the tables! The combobox has been changed to text boxes and you now have another way of doing it (as well as georgev's search.zip file.)

    Look at this and learn from the code I put in this! It seriously will help you. I can see that you're struggling and trying to find work-arounds verses looking at the samples provided and utilize good solutions.

    I don't mean to be upset SAMI2 but you need to look at examples people take the time to do and provide you and learn from them.
    Attached Files Attached Files
    Last edited by pkstormy; 07-19-07 at 14:50.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  7. #7
    Join Date
    Apr 2007
    Posts
    81
    HI pkstormy

    In this sample just up you add (LOOKATTHIS) I changed combobox to textbox by right click. In this case no doing search and sconed problem, when I add new record for teacher and open again, show the student form with teacher information.

    thanks

  8. #8
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Look at the post I uploaded (SAMI2LOOKATTHIS.zip) above or download the zip in this post (they're both the same and have a "new" revised LOOKATTHIS.mdb). It shows you how to do it with a text box verses a combobox! Please download and look at SAMI2LOOKATTHIS.zip which I've revised the LOOKATTHIS.mdb! (look at the NEW LOOKATTHIS.mdb in THIS zip file!) It also opens the Student Form or Teacher form based on whether Teacher is marked as true or not (which the other examples also do). Are you marking the Teacher check box as True for teachers and leaving False for students on the form????

    Here it is again (same as #6)! Look at the "new" revised LOOKATTHIS.mdb in this zip file which does exactly what you want it to do. It WILL go to the student form or the teacher form depending on if you check the Teacher check box on the form which you needed to have.
    Attached Files Attached Files
    Last edited by pkstormy; 07-19-07 at 15:09.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  9. #9
    Join Date
    Apr 2007
    Posts
    81
    HI pkstormy

    THANK YOU SO MUCH
    I appreciate your efforts, That is excellent solution

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •