Results 1 to 7 of 7
  1. #1
    Guy LeB is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Nov 2015
    Posts
    3

    SQL query in A97 on history list in SubForms ask now for "Enter parameter value" in A2007-2013

    In almost all of my history list, mostly in sub form based on previously chosen values of the main form & table, Access gives me a dialog box relating:



    "Enter parameter value"
    Formulaires!Entrepot famille création!Entrepot (As per example below)

    Original A97 SQL:Système de gestion intégré.zip
    FROM Entrepot INNER JOIN Famille ON Entrepot.Entrepot = Famille.Entrepot
    WHERE (((Entrepot.Entrepot)=[Formulaires]![Entrepot famille création]![Entrepot]))
    ORDER BY Famille.Famille;

    Original A97 VBA AfterUpdate event:
    Private Sub Actualisation_AfterUpdate()
    ' Rechercher l'enregistrement correspondant au contrôle.
    Me.RecordsetClone.FindFirst "[Famille] = '" & Me![Actualisation] & "'"
    Me.Bookmark = Me.RecordsetClone.Bookmark
    End Sub

    The biggest problem that I have, is that the Access passion that I had was in 2000. And just for the fun of it, I have designed an ERP (Enterprise resource planner) system that I could use today. It is not complete, but many features are functional. Roughly 50 tables, 100 forms, queries and reports.

    I really do wish, "magical thinking!", only syntax changes are involved...

    Thank you All !

    Guy LeB

    Note: I have attached my Database. If you solve my problem, fell free to use it but do not forget me...
    Last edited by Guy LeB; 11-20-2015 at 09:05 PM. Reason: Supplied Zip DataBase for trouble shooting

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by Guy LeB View Post
    FROM Entrepot INNER JOIN Famille ON Entrepot.Entrepot = Famille.Entrepot
    WHERE (((Entrepot.Entrepot)=[Formulaires]![Entrepot famille création]![Entrepot]))
    ORDER BY Famille.Famille;
    This is an incomplete SQL statement and I suspect this lies at the root of your issue. Are you trying to create a SELECT statement to retrieve data?

  3. #3
    Guy LeB is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Nov 2015
    Posts
    3
    Hi ItsMe,

    Thank you for reminding me to check what info I am mailing. The complete SQL statement is as below. It use to work properly in Access 97. But it does not work anymore. Any suggestions?


    SELECT DISTINCTROW Famille.Famille, Entrepot.Entrepot
    FROM Entrepot INNER JOIN Famille ON Entrepot.Entrepot = Famille.Entrepot
    WHERE (((Entrepot.Entrepot)=[Formulaires]![Entrepot famille création]![Entrepot]))
    ORDER BY Famille.Famille;

    Note: I am trying to retrieve data in a history list in a sub form based on the value of my main form. Maybe I should use a click_On event???
    It as been 15 years since I have touch Access, so I am a bit rusted...

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Nothing is really jumping out at me.

    The error is common and happens when there is a misspelling of a field name or a control name.

    I would start by testing your SQL statement by creating a new query object using the Query Designer. Paste your SQL statement into SQL view. Then switch to Datasheet View. Of Course, you will have to have your form open (Entrepot famille creation) to manage your WHERE clause.

    See if you get the error when using your SQL in a new query object and your form is open. Make sure that your form is on a record where Entrepot has an actual value.

  5. #5
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Change [Formulaires] to Forms and see if that solves it. I'm assuming the reference has to be in English, but that just could be because of my regional settings because that's how I got it to go away. You may encounter more of these references that have been translated from English to French in your project, so if that's the solution for you too, you will have to change others if you have them.
    Last edited by Micron; 11-21-2015 at 03:16 PM. Reason: edited comments to reflect possible regional settings may be at work

  6. #6
    Guy LeB is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Nov 2015
    Posts
    3
    Micron,
    I just tried changing all of "Formulaires" into "Forms". And it worked. Last time I tried I did not change in all the database. I still get the same error in some forms but it is because I did not got all of them yet. This is great...I will be able to use it!!!
    Thanks a million! This is a great forum when you have time to try to repair your database!
    Guy

  7. #7
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Nice to hear, because I had no other clue as to why. Good luck, and you're welcome!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 06-24-2015, 11:46 AM
  2. Replies: 2
    Last Post: 05-20-2015, 08:26 AM
  3. Replies: 8
    Last Post: 07-15-2014, 05:56 PM
  4. Replies: 7
    Last Post: 01-23-2011, 12:32 PM
  5. Replies: 4
    Last Post: 01-06-2011, 10:52 AM

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