Mutipul Question "NULL and Post"

Hi everyone,

I am creating a variable start up form where I store the Primary
Company information to tbl_Primary_Company. This form will hold
several test boxes and one cbo to select zipcode and add city and
state. Very simple. What I want to do with this is to have the company
name, address, city, state, and zip to be added to tbl_Company, this
could be done with a cmd button or just simply by being added but I am
not sure on how to do this. My next question is I would also like this
form to open only if the company name is null and if not, then go to
my actual startup frm Main_Menu.I am not real good with If IsNUll and
such so if I could get some help with this that wowuld be great.

Thanks
Dave "d9pierce@mchsi.com"

0
d9pierce
3/11/2007 1:44:11 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
629 Views

Similar Articles

[PageSpeed] 41

hi Dave,

d9pierce@mchsi.com wrote:
> I am creating a variable start up form where I store the Primary
> Company information to tbl_Primary_Company. This form will hold
> several test boxes and one cbo to select zipcode and add city and
> state. Very simple. What I want to do with this is to have the company
> name, address, city, state, and zip to be added to tbl_Company, this
> could be done with a cmd button or just simply by being added but I am
> not sure on how to do this.
Just create a form and set its datasource to your table.
Set the DataEntry property to True.

You may also set the BorderStyle to Dialog and PopUp and Modal to True.

Avoid using [Name] as field name as it is a reserved word.

> My next question is I would also like this
> form to open only if the company name is null and if not, then go to
> my actual startup frm Main_Menu.I am not real good with If IsNUll and
> such so if I could get some help with this that wowuld be great.
Create public function in a normal module and call it in a macro called 
"Autoexec":

Public Function CheckCompany() As Boolean

   If IsNull(DLookup("CompanyName", "tbl_Primary_Company")) Then
      CheckCompany = False
      DoCmd.OpenForm FormName := "EnterPrimaryCompany", _
                     WindowMode := acDialog
      Else
      CheckCompany = True
      DoCmd.OpenForm "Main_Menu"
   End If

End Function

mfg
--> stefan <--
0
Stefan
3/11/2007 2:02:51 PM
On Mar 11, 7:02 am, Stefan Hoffmann <ste...@ste5an.de> wrote:
> hi Dave,
>
> d9pie...@mchsi.com wrote:
> > I am creating a variable start up form where I store the Primary
> > Company information to tbl_Primary_Company. This form will hold
> > several test boxes and one cbo to select zipcode and add city and
> > state. Very simple. What I want to do with this is to have the company
> > name, address, city, state, and zip to be added to tbl_Company, this
> > could be done with a cmd button or just simply by being added but I am
> > not sure on how to do this.
>
> Just create a form and set its datasource to your table.
> Set the DataEntry property to True.
>
> You may also set the BorderStyle to Dialog and PopUp and Modal to True.
>
> Avoid using [Name] as field name as it is a reserved word.
>
> > My next question is I would also like this
> > form to open only if the company name is null and if not, then go to
> > my actual startup frm Main_Menu.I am not real good with If IsNUll and
> > such so if I could get some help with this that wowuld be great.
>
> Create public function in a normal module and call it in a macro called
> "Autoexec":
>
> Public Function CheckCompany() As Boolean
>
>    If IsNull(DLookup("CompanyName", "tbl_Primary_Company")) Then
>       CheckCompany = False
>       DoCmd.OpenForm FormName := "EnterPrimaryCompany", _
>                      WindowMode := acDialog
>       Else
>       CheckCompany = True
>       DoCmd.OpenForm "Main_Menu"
>    End If
>
> End Function
>
> mfg
> --> stefan <--

Thank you so much

0
d9pierce
3/11/2007 2:54:37 PM
Reply:

Similar Artilces:

Mutipul Question "NULL and Post"
Hi everyone, I am creating a variable start up form where I store the Primary Company information to tbl_Primary_Company. This form will hold several test boxes and one cbo to select zipcode and add city and state. Very simple. What I want to do with this is to have the company name, address, city, state, and zip to be added to tbl_Company, this could be done with a cmd button or just simply by being added but I am not sure on how to do this. My next question is I would also like this form to open only if the company name is null and if not, then go to my actual startup frm Main_Menu.I am not...