Sabtu, 21 Oktober 2023

Re: [MSAccessProfessionals] sql list

For starters there needs to be a space rather than a comma before WHERE. This should help:

https://baldyweb.com/ImmediateWindow.htm



Paul
Sent via mobile device


-------- Original message --------
From: smiley2004_10 <cas23121964@gmail.com>
Date: 10/21/23 3:02 AM (GMT-08:00)
To: MSAccessProfessionals@groups.io
Subject: [MSAccessProfessionals] sql list

Hi

What I'm trying to achieve here one menu set of buttons control the outcome of a list;

 

The user selects from the main menu (1)

Which place the number one in this case into the text box (2)

The user then clicks the hamburger icon (3) in which the category list appears sorted out by query

The list box should only show a category list as shown (5). But unfortunately the list turns up blank, or without the selection condition shows all.

 

The VBA

   SQLText = " SELECT [dbtMenuSubList1].[Menlistid],[dbtMenuSubList1].[MListName] " _

       & " FROM [dbtMenuSubList1],WHERE [dbtMenuSubList1].[Menlistid]= 1; "

Me.ListSubMenu.RowSource = SQLText

Could I please if you could tell how to achieve the above , and point out what I did wrong (office 365 64bit)

Tidak ada komentar:

Posting Komentar