Prev: Duplicated Invoice number checking when leave the field
Next: How do I check the current value of check box not reffering it
From: aw on 14 May 2010 00:16 I have 1 qry & 1 form. Query named : QRY_bl_SalesInvoice BL no. Sales Invoice BL001 IV509999 BL002 (blank) BL003 IV507777 Under the FORM, drop-down box named “dropdownBL” is used by user to select BL no. under the qry on (a). Questions : How I set the following controls, Case 1 : If BL no. under the drop-down box “dropdownBL” after select = BL002 (with Sales Invoice=blank under the QRY) , then free to input on the field named “Sales Invoice" Case 2 : If BL no. under the drop-down box “dropdownBL” after select = BL001 (with Sales Invoice<>blank) , then the field named “Sales Invoice" will lookup related qry's IV value, i.e. “IV509999” as its value Also how we PREVENT user to amend the content that call from QRY in case 2? -- aw
From: Amy E. Baggott on 14 May 2010 15:53
If I'm reading your question correctly, then your best bet would be to put something like the following in the After Update event of dropdownBL: If IsNull(Me.dropdownBL.column(1)) Then Me.SalesInvoice.Locked = False Else Me.SalesInvoice = Me.dropdownBL.column(1) Me.SalesInvoice.Locked = True End If Hope this helps. -- Amy E. Baggott "I''m going crazy and I''m taking all of you with me!" -- Linda Grayson "aw" wrote: > I have 1 qry & 1 form. > > Query named : QRY_bl_SalesInvoice > > BL no. Sales Invoice > BL001 IV509999 > BL002 (blank) > BL003 IV507777 > > > Under the FORM, drop-down box named “dropdownBL” is used by user to select > BL no. under the qry on (a). > > Questions : > > How I set the following controls, > > Case 1 : If BL no. under the drop-down box “dropdownBL” after select = > BL002 (with Sales Invoice=blank under the QRY) , then free to input on the > field named “Sales Invoice" > > Case 2 : If BL no. under the drop-down box “dropdownBL” after select = > BL001 (with Sales Invoice<>blank) , then the field named “Sales Invoice" will > lookup related qry's IV value, i.e. “IV509999” as its value > > Also how we PREVENT user to amend the content that call from QRY in case 2? > > -- > aw |