From: Peter on 16 Jan 2010 12:02 Hi All... I use a popup form to copy text from textfield from an open form.. I want to use this code If Forms.[Fruitsbasket].[Fruits] = "Yellow" Then Me.[Fruittype] = "1st_Banana" End If I want to use five If's..but for some reason..it does not fire the first line of IF code...why is that? Thanks!
From: Mike Painter on 16 Jan 2010 13:58 Peter wrote: > Hi All... > > I use a popup form to copy text from textfield from an open form.. > > I want to use this code > > If Forms.[Fruitsbasket].[Fruits] = "Yellow" Then > Me.[Fruittype] = "1st_Banana" > End If > > I want to use five If's..but for some reason..it does not fire the > first line of IF code...why is that? > > Thanks! The only reasons a line would not "fire" would be if there was something previous that skipped over it or the code was in the wrong event.
From: Peter on 16 Jan 2010 14:57 Thanks Mike..but i do not recevie any error message..the only "line" it the Sub text "Private Sub Form_Load()" ???????? Thanks! "Mike Painter" wrote: > Peter wrote: > > Hi All... > > > > I use a popup form to copy text from textfield from an open form.. > > > > I want to use this code > > > > If Forms.[Fruitsbasket].[Fruits] = "Yellow" Then > > Me.[Fruittype] = "1st_Banana" > > End If > > > > I want to use five If's..but for some reason..it does not fire the > > first line of IF code...why is that? > > > > Thanks! > > The only reasons a line would not "fire" would be if there was something > previous that skipped over it or the code was in the wrong event. > > > . >
From: Stuart McCall on 16 Jan 2010 20:22 "Peter" <Peter(a)discussions.microsoft.com> wrote in message news:50F3604B-4968-4D4A-AAFF-FAE8488D2F62(a)microsoft.com... > Hi All... > > I use a popup form to copy text from textfield from an open form.. > > I want to use this code > > If Forms.[Fruitsbasket].[Fruits] = "Yellow" Then > Me.[Fruittype] = "1st_Banana" > End If > > I want to use five If's..but for some reason..it does not fire the first > line of IF code...why is that? > > Thanks! If Forms![Fruitsbasket].[Fruits] = "Yellow" Then Notice I changed from Forms. to Forms! Forms is a collection containing references to all open forms. To refer to a member of a collection by name, use the Bang (!) syntax as above or Forms("Fruitsbasket") Dot is used for properties and methods.
|
Pages: 1 Prev: populate textbox by name(number) Next: RowSource in Access 2007 |