Solved select .. where (1 Viewer)

Safari

Member
Local time
Today, 18:21
Joined
Jun 14, 2021
Messages
95
HI ALL ,

PLEASE I WANT TO MAKE QUERY USING VBA CODE

FORM NAME : STORES
COMBOBOX : STORE
COMMAND : COMMAND3

WHEN I PRESS COMMAND3 .. SELECT STOREID CODE FROM COMBOBOX THEN RESULT IN QUERY DEBEND ON COMBOBOX NUMBER

PLEASE HELP
 

Attachments

  • test.accdb
    3.3 MB · Views: 111

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:21
Joined
May 7, 2009
Messages
19,245
check if this is correct.
view the code on the button.
 

Attachments

  • test (1).accdb
    3.7 MB · Views: 108

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:21
Joined
Feb 19, 2002
Messages
43,275
If you don't know how to write SQL, start by using the QBE (Query By Example). Usually you start with a select query to select what you want from a table, then change the query type to Append or update is that is what you want to do. This will enable you to get the joins and other syntax right. Once it works, you can switch to SQL view and copy the SQL into your VBA. I don't do that for a variety of reasons that are not relevant to your question but it is not categorically wrong wo use embedded SQL so do whatever you want.
 

oleronesoftwares

Passionate Learner
Local time
Today, 09:21
Joined
Sep 22, 2014
Messages
1,159
If you don't know how to write SQL, start by using the QBE (Query By Example)
Following on @Pat Hartman's suggestion, below are two articles you can read.



Also read up combo box properties to know which properties to manipulate.

Cheers
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:21
Joined
Feb 19, 2002
Messages
43,275
It is always nice when a good person like arnel does your work for you but he isn't always going to be available and at some point, you need to learn how to do it for yourself. The QBE is an excellent teacher.
 

Users who are viewing this thread

Top Bottom