Results 1 to 6 of 6
  1. #1
    qwerty is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    91

    What I am doing wrong?

    I am trying to practice, and typing this in Visual Basic

    Private Sub List19_BeforeUpdate(Cancel As Integer)


    SELECT * FROM FormQuery
    End Sub

    I receive an error message stating "Compile Error: Expected: Case"

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Explain what you are trying to do. More info is needed.

    Just having an SQL statement (SELECT * FROM FormQuery) in a procedure will do nothing.

  3. #3
    qwerty is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    91
    Quote Originally Posted by ssanfu View Post
    Explain what you are trying to do. More info is needed.

    Just having an SQL statement (SELECT * FROM FormQuery) in a procedure will do nothing.
    I am practicing retrieving data from a query I created. I am trying to start with basics https://www.w3schools.com/sql/. I wrote it exactly that. My record source is already setup in the form. I am trying to get a field to appear in the listbox and filter base on the selection made in the first page. I can post the file online, but welling to pay someone on here to view my computer screen through Skype and teach me. Let me know your price?

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    OK, you have a bound form with a list box on it. You would set the List box Control Source property to a field in the form record source. Then you would need to set the List box Row Source property to a Saved Query or an SQL statement.


    Quote Originally Posted by ryder214 View Post
    <snip> and filter base on the selection made in the first page.
    Not sure what you mean by this -what is "in the first page"?



    Yes, it would help if you posted your dB.

  5. #5
    qwerty is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    91
    Quote Originally Posted by ssanfu View Post
    OK, you have a bound form with a list box on it. You would set the List box Control Source property to a field in the form record source. Then you would need to set the List box Row Source property to a Saved Query or an SQL statement.



    Not sure what you mean by this -what is "in the first page"?



    Yes, it would help if you posted your dB.
    Do you have Skype? I will screen share and pay you?

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Sorry, I don't have Skype.

    I would strongly suggest working through the tutorials from RogersAccessLibrary to get familiar with the process. Don't just look at them, actually take the time to do them.

    Still willing to post your dB?

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

Similar Threads

  1. I KNOW I am doing it wrong
    By lonesoac0 in forum Macros
    Replies: 2
    Last Post: 12-17-2016, 06:32 PM
  2. what is wrong ?
    By dino in forum Access
    Replies: 19
    Last Post: 07-29-2015, 11:13 AM
  3. What am I doing wrong?
    By Access_noob_ in forum Programming
    Replies: 3
    Last Post: 11-03-2014, 10:47 AM
  4. What's wrong!
    By khalid in forum Programming
    Replies: 15
    Last Post: 06-27-2011, 06:38 AM
  5. What is wrong with this IFF?
    By bburton in forum Reports
    Replies: 2
    Last Post: 03-16-2011, 10:42 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