strSQL

  • Thread starter auujxa2 via AccessMonster.com
  • Start date
A

auujxa2 via AccessMonster.com

I have a form with a bunch of combos and lists. In this case, I'm trying to
accomplish simulating a store/department. So, as an example:

If I have store #1 (cboStore), with department 100 (cboDept) selected from
two combos. I want to be able to mirror another selected store (cboSimStore)
/department (cboSimDept) - let's say store 3 department 100.

For starters, this is what I have to clear out the existing Store #1,
department 100. And this works. It basically makes all the vendors within
the selected department inactive.

strSQL = "UPDATE [MasterTbl] " & "SET [Indicator] = False " & _
"WHERE [MasterTbl].[Store #] = " & Me.cboStore.Column(1) &
"" & _
" And [MasterTbl].[Department] = """ & Me.cboDept & """"

DoCmd.RunSQL strSQL

My second step needs to update the store/department mentioned above, but from
a different store/dept combo. (cboSimStore) (cboSimDept)

i figure it's something along the lines of IN (SELECT, but I don't know how
exactly

thank you in advance
 
L

Lord Kelvan

so you are wanting to make

cboStore = cboSimStore

and

cboDept = cboSimDept

where

cboStore = what the user chose

and

cboDept = what the user chose

is this correct

Regards
Kelvan
 
A

auujxa2 via AccessMonster.com

yes.

Whatever departments are active (TRUE) in the Sim Store/Dept, i want to be
active in the cboStore/Dept
 
L

Lord Kelvan

update MasterTbl set [Store #] = cboSimStore, Department = cboSimDept
where [Store #] = cboStore and Department = cboDept

something like that should do it

Regards
Kelvan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top