Mutipul Question "NULL and Post"

D

d9pierce

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 "(e-mail address removed)"
 
S

Stefan Hoffmann

hi Dave,

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 <--
 
D

d9pierce

hi Dave,

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
 

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