Page 3 of 3 FirstFirst 123
Results 31 to 38 of 38
  1. #31
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Quote Originally Posted by REDandBLACKpack View Post
    all of the names are the same except when i imported in the form it named it Contracts Form1



    I meant to capitalize it in the earlier post about the error. i tried putting what you said into the parameter value and even with contracts Form1 but it does not bring in any info
    Do you understand what naming does to an object? ANY TIME you change an object name you have to change ALL references to that name ANYWHERE in your database. When you imported your contracts form and it came in with the name contracts form1 any reference to contracts form will now be invalid (the query that drives your form is referencing contracts form). Rename your existing contracts form to contracts form-notworking or something then rename your contracts form1 to contracts form and run it.

  2. #32
    REDandBLACKpack is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2011
    Posts
    27
    Quote Originally Posted by rpeare View Post
    Code:
    Private Sub searchfield_BeforeUpdate(Cancel As Integer)
     
    End Sub
     
    Private Sub searchfield_Click()
     
    End Sub
     
    Private Sub searchfield_Exit(Cancel As Integer)
         DoCmd.GoToControl ("COUNTERPARTY")
         Me.Requery
         DoCmd.GoToControl ("COUNTERPARTY")
    End Sub
    this is three different events.

    one is the BEFORE UPDATE event of your searchfield (which is doing nothing)
    one is the ON CLICK event of your searchfield (which is doing nothing)

    and one is the ON EXIT event of your searchfield in which you're calling your gotocontrol twice.

    so firstly, and for the last time, please, please, please just click on the ON EXIT event of the SEARCHFIELD text box. Click ONCE on the row that says ON CLICK. At the far right hand side of that row a small button will appear that has three dots on it (...). Click that button it should take you to the section of code that says:

    Code:
    Private Sub searchfield_Exit(Cancel As Integer)
         DoCmd.GoToControl ("COUNTERPARTY")
         Me.Requery
         DoCmd.GoToControl ("COUNTERPARTY")
     End Sub
    if it does, remove remove the first DOCMD.GOTCONTROL("COUNTERPARTY")
    if it does NOT then you have not named your searchfield correctly and you have to rename the unbound textbox to SEARCHFIELD, then go back through this same process to attach the code to your ON CLICK event.

    Secondly. If you are getting a parameter value prompt you have NOT named all of your objects the same, either your form name or your unbound text box SEARCHFIELD is no longer named SEARCHFIELD (as mentioned above) and you need to fix those two items.
    I am clicking only on the ON EXIT

    it still shows the other codes:
    http://uploader.ws/upload/201108/screenshot.jpg

  3. #33
    REDandBLACKpack is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2011
    Posts
    27
    Quote Originally Posted by rpeare View Post
    Do you understand what naming does to an object? ANY TIME you change an object name you have to change ALL references to that name ANYWHERE in your database. When you imported your contracts form and it came in with the name contracts form1 any reference to contracts form will now be invalid (the query that drives your form is referencing contracts form). Rename your existing contracts form to contracts form-notworking or something then rename your contracts form1 to contracts form and run it.
    sorry, i realize the naming issues but did not think about changing it. it works imported in using the correct name

  4. #34
    REDandBLACKpack is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2011
    Posts
    27
    So I guess since it works, i could just delete my other one and use this one, unless you know of a reason why I shouldnt. It seems to be working fine just playing around with it though.

    Thank you SO much for your help, I am sure that was very frustrating for you!

  5. #35
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    You should figure out what you were doing wrong so you know for the next time. You fouled up something and rather than ignoring it you should try to understand what it is that is wrong so you know how to fix it.

    any time you see a long dark line across your code it is the start of a new event, function etc. In your screen shot it's showing two different events.

    Event 1 is the ON CLICK event of your SEARCHFIELD. There is no code attached to it other than the beginning and end markers of the event:

    Code:
    Private Sub SearchField_Click()
    
    End Sub
    so when you click on the SEARCHFIELD nothing is going to happen.

    Event 2 is the ON EXIT event of your SEARCHFIELD.

    I suspect you have misspelled something in the query, form, or somewhere else that is causing you to get a parameter value pop up box and the only way for you to find it is to examine both forms and find out where that is.

  6. #36
    REDandBLACKpack is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2011
    Posts
    27
    Quote Originally Posted by rpeare View Post
    You should figure out what you were doing wrong so you know for the next time. You fouled up something and rather than ignoring it you should try to understand what it is that is wrong so you know how to fix it.

    any time you see a long dark line across your code it is the start of a new event, function etc. In your screen shot it's showing two different events.

    Event 1 is the ON CLICK event of your SEARCHFIELD. There is no code attached to it other than the beginning and end markers of the event:

    Code:
    Private Sub SearchField_Click()
     
    End Sub
    so when you click on the SEARCHFIELD nothing is going to happen.

    Event 2 is the ON EXIT event of your SEARCHFIELD.

    I suspect you have misspelled something in the query, form, or somewhere else that is causing you to get a parameter value pop up box and the only way for you to find it is to examine both forms and find out where that is.
    I was only getting the parametere value pop up box when the form was called Contracts Form1

    I know that the dark line seperates a new event, etc but I was not sure why if I clicked on EXIT it would bring up the CLICK one as well

  7. #37
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I'm talking about the original form, not the imported one, that's what you should figure out.

  8. #38
    REDandBLACKpack is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2011
    Posts
    27
    Quote Originally Posted by rpeare View Post
    I'm talking about the original form, not the imported one, that's what you should figure out.
    I guess I will just have to take them and put them side by side to see what differences there are

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 01-14-2016, 02:18 PM
  2. Replies: 3
    Last Post: 10-11-2011, 01:43 PM
  3. Replies: 9
    Last Post: 07-14-2011, 07:20 AM
  4. index/primary cannot contain null value
    By BinHDreW in forum Access
    Replies: 1
    Last Post: 05-26-2011, 08:25 PM
  5. UNION two tables with same primary key values
    By carillonator in forum Queries
    Replies: 1
    Last Post: 02-02-2010, 08:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums