working with forms

F

fervet

i am relatively new to access 2000. i have a list of records that i have
created in excel and i have already imported all this to access.

what i am trying to do is to create a form with a search command button that
will enable a user to enter information, hit the search button and have all
the information on that record displayed in a table.

Any suggestions on getting started would be appreciated.
 
O

Ofer Cohen

Create a Query that is based on the table you created, in the criteria of
each field and the path to the appropriate field in the form

Select * From TableName Where FieldName Like
Nz(Forms![FormName]![FieldName],"*")

The Nz function will return * if no data was inserted to the field in the
form, so the query will return all the records.

When you hit the button, you can open this query

Docmd.OpenQuery "QueryName"
 
F

fervet

Thank you i really appreciate that.
I succesfullly created the query with 3 columns: ID, Description and PART #
from the orginal table.

In criteria column under PART #, I typed:
Nz(Forms![Form1]![PART #], "*").

i created Form1, with two options- a combo box where i can enter the part
number, and a command button "run query", but when i hit this button the
search results came up blank.

Am i doing the right thing? please help.

Ofer Cohen said:
Create a Query that is based on the table you created, in the criteria of
each field and the path to the appropriate field in the form

Select * From TableName Where FieldName Like
Nz(Forms![FormName]![FieldName],"*")

The Nz function will return * if no data was inserted to the field in the
form, so the query will return all the records.

When you hit the button, you can open this query

Docmd.OpenQuery "QueryName"
--
Good Luck
BS"D


fervet said:
i am relatively new to access 2000. i have a list of records that i have
created in excel and i have already imported all this to access.

what i am trying to do is to create a form with a search command button that
will enable a user to enter information, hit the search button and have all
the information on that record displayed in a table.

Any suggestions on getting started would be appreciated.
 
O

Ofer Cohen

Add to the criteria Like

Like Nz(Forms![Form1]![PART #], "*")

--
Good Luck
BS"D


fervet said:
Thank you i really appreciate that.
I succesfullly created the query with 3 columns: ID, Description and PART #
from the orginal table.

In criteria column under PART #, I typed:
Nz(Forms![Form1]![PART #], "*").

i created Form1, with two options- a combo box where i can enter the part
number, and a command button "run query", but when i hit this button the
search results came up blank.

Am i doing the right thing? please help.

Ofer Cohen said:
Create a Query that is based on the table you created, in the criteria of
each field and the path to the appropriate field in the form

Select * From TableName Where FieldName Like
Nz(Forms![FormName]![FieldName],"*")

The Nz function will return * if no data was inserted to the field in the
form, so the query will return all the records.

When you hit the button, you can open this query

Docmd.OpenQuery "QueryName"
--
Good Luck
BS"D


fervet said:
i am relatively new to access 2000. i have a list of records that i have
created in excel and i have already imported all this to access.

what i am trying to do is to create a form with a search command button that
will enable a user to enter information, hit the search button and have all
the information on that record displayed in a table.

Any suggestions on getting started would be appreciated.
 
F

fervet

works well. thank you

Ofer Cohen said:
Add to the criteria Like

Like Nz(Forms![Form1]![PART #], "*")

--
Good Luck
BS"D


fervet said:
Thank you i really appreciate that.
I succesfullly created the query with 3 columns: ID, Description and PART #
from the orginal table.

In criteria column under PART #, I typed:
Nz(Forms![Form1]![PART #], "*").

i created Form1, with two options- a combo box where i can enter the part
number, and a command button "run query", but when i hit this button the
search results came up blank.

Am i doing the right thing? please help.

Ofer Cohen said:
Create a Query that is based on the table you created, in the criteria of
each field and the path to the appropriate field in the form

Select * From TableName Where FieldName Like
Nz(Forms![FormName]![FieldName],"*")

The Nz function will return * if no data was inserted to the field in the
form, so the query will return all the records.

When you hit the button, you can open this query

Docmd.OpenQuery "QueryName"
--
Good Luck
BS"D


:

i am relatively new to access 2000. i have a list of records that i have
created in excel and i have already imported all this to access.

what i am trying to do is to create a form with a search command button that
will enable a user to enter information, hit the search button and have all
the information on that record displayed in a table.

Any suggestions on getting started would be appreciated.
 
O

Ofer Cohen

Your welcome, glad I could help

--
Good Luck
BS"D


fervet said:
works well. thank you

Ofer Cohen said:
Add to the criteria Like

Like Nz(Forms![Form1]![PART #], "*")

--
Good Luck
BS"D


fervet said:
Thank you i really appreciate that.
I succesfullly created the query with 3 columns: ID, Description and PART #
from the orginal table.

In criteria column under PART #, I typed:
Nz(Forms![Form1]![PART #], "*").

i created Form1, with two options- a combo box where i can enter the part
number, and a command button "run query", but when i hit this button the
search results came up blank.

Am i doing the right thing? please help.

:

Create a Query that is based on the table you created, in the criteria of
each field and the path to the appropriate field in the form

Select * From TableName Where FieldName Like
Nz(Forms![FormName]![FieldName],"*")

The Nz function will return * if no data was inserted to the field in the
form, so the query will return all the records.

When you hit the button, you can open this query

Docmd.OpenQuery "QueryName"
--
Good Luck
BS"D


:

i am relatively new to access 2000. i have a list of records that i have
created in excel and i have already imported all this to access.

what i am trying to do is to create a form with a search command button that
will enable a user to enter information, hit the search button and have all
the information on that record displayed in a table.

Any suggestions on getting started would be appreciated.
 
Top