SELECT DATA TO VIEW IN DROP DOWN ON FORM

A

Akrt48

Can anyone please tell me what I have done wrong in this statement? I have a
Form with a sub form on the sub form I want to limit the Blocks that show up
in a drop down form to the jobs that are assigned to Divisions. I have a
table called jobs with the fields Block and Division which are in my sub
form. When I enter a Division the block column shows blank fields. I have
bound the right column to the Block field. Thanks

SELECT Jobs.Block FROM Jobs WHERE
(((Jobs.Division)=Forms!timeslips![operatinghours Subform].Form!division))
GROUP BY Jobs.Block ORDER BY Jobs.Block;
 
D

Douglas J. Steele

What's the context behind the SQL? Is that what you copied-and-pasted from
the SQL view of a query, or is it something you're trying to use in VBA
code?
 
O

Ofer

On the after update event of the devision, did you refresh the Jobs combo?
If not put thid code on the after update event of devision

Me.[enter here City combo name].Requery
 
A

Akrt48

Thanks Ofer, thats all it took.
Can't believe I missed it.

Ofer said:
On the after update event of the devision, did you refresh the Jobs combo?
If not put thid code on the after update event of devision

Me.[enter here City combo name].Requery

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



Akrt48 said:
Can anyone please tell me what I have done wrong in this statement? I have a
Form with a sub form on the sub form I want to limit the Blocks that show up
in a drop down form to the jobs that are assigned to Divisions. I have a
table called jobs with the fields Block and Division which are in my sub
form. When I enter a Division the block column shows blank fields. I have
bound the right column to the Block field. Thanks

SELECT Jobs.Block FROM Jobs WHERE
(((Jobs.Division)=Forms!timeslips![operatinghours Subform].Form!division))
GROUP BY Jobs.Block ORDER BY Jobs.Block;
 
Top