Base a text box on input

G

Gunti

Hello,
I'm starting out with Access and it's being kind of a hassle.

Basicly i've got the following query:


200 - Alfa - Beta - Gamma
220 - Delta - Epsilon - Etc

Basicly what i want is an input field where people have to type: 200

Whereafter 3 text boxes display those values underneath eachother (Access
has to lookup these values).

I'm having trouble to make the 3 text boxes rely on that one textbox.

Greets & Thanks,
Gunti
 
W

Wayne-I-M

There are quite afew methods to do this

You could filter the query
In the query use the criteria row and point to the form control

You could use a mainform subform which sub linked to the main by the ID (the
control input I assume)

you could use the wizard which would give you something like this as the
afterupdate event of your text box.

Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDField] = " & Str(Nz(Me![ControlName], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

In this case I assume that 200, 220, etc are based on the primary field in
the table

etc
etc
etc
you need to give more details to get a more specific answer - but hope this
points you in the right direction
 
G

Gunti

Thanks for your reply. The problem i have is that i, for example, have no
clue how to either: Point the criteria to the form control. The wizard also
won't show up if i create a text box.

Greets,
Gunti

Wayne-I-M said:
There are quite afew methods to do this

You could filter the query
In the query use the criteria row and point to the form control

You could use a mainform subform which sub linked to the main by the ID (the
control input I assume)

you could use the wizard which would give you something like this as the
afterupdate event of your text box.

Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDField] = " & Str(Nz(Me![ControlName], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

In this case I assume that 200, 220, etc are based on the primary field in
the table

etc
etc
etc
you need to give more details to get a more specific answer - but hope this
points you in the right direction




--
Wayne
Trentino, Italia.



Gunti said:
Hello,
I'm starting out with Access and it's being kind of a hassle.

Basicly i've got the following query:


200 - Alfa - Beta - Gamma
220 - Delta - Epsilon - Etc

Basicly what i want is an input field where people have to type: 200

Whereafter 3 text boxes display those values underneath eachother (Access
has to lookup these values).

I'm having trouble to make the 3 text boxes rely on that one textbox.

Greets & Thanks,
Gunti
 
W

Wayne-I-M

If you have the primary field (from the table) shown in a control on your
form - post the name of that control

Create a textbox and give it some name that means somethig to you - post the
name of the tetxbox


--
Wayne
Trentino, Italia.



Gunti said:
Thanks for your reply. The problem i have is that i, for example, have no
clue how to either: Point the criteria to the form control. The wizard also
won't show up if i create a text box.

Greets,
Gunti

Wayne-I-M said:
There are quite afew methods to do this

You could filter the query
In the query use the criteria row and point to the form control

You could use a mainform subform which sub linked to the main by the ID (the
control input I assume)

you could use the wizard which would give you something like this as the
afterupdate event of your text box.

Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDField] = " & Str(Nz(Me![ControlName], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

In this case I assume that 200, 220, etc are based on the primary field in
the table

etc
etc
etc
you need to give more details to get a more specific answer - but hope this
points you in the right direction




--
Wayne
Trentino, Italia.



Gunti said:
Hello,
I'm starting out with Access and it's being kind of a hassle.

Basicly i've got the following query:


200 - Alfa - Beta - Gamma
220 - Delta - Epsilon - Etc

Basicly what i want is an input field where people have to type: 200

Whereafter 3 text boxes display those values underneath eachother (Access
has to lookup these values).

I'm having trouble to make the 3 text boxes rely on that one textbox.

Greets & Thanks,
Gunti
 
G

Gunti

PostcodeInput

that's the name

Greets

Wayne-I-M said:
If you have the primary field (from the table) shown in a control on your
form - post the name of that control

Create a textbox and give it some name that means somethig to you - post the
name of the tetxbox


--
Wayne
Trentino, Italia.



Gunti said:
Thanks for your reply. The problem i have is that i, for example, have no
clue how to either: Point the criteria to the form control. The wizard also
won't show up if i create a text box.

Greets,
Gunti

Wayne-I-M said:
There are quite afew methods to do this

You could filter the query
In the query use the criteria row and point to the form control

You could use a mainform subform which sub linked to the main by the ID (the
control input I assume)

you could use the wizard which would give you something like this as the
afterupdate event of your text box.

Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDField] = " & Str(Nz(Me![ControlName], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

In this case I assume that 200, 220, etc are based on the primary field in
the table

etc
etc
etc
you need to give more details to get a more specific answer - but hope this
points you in the right direction




--
Wayne
Trentino, Italia.



:

Hello,
I'm starting out with Access and it's being kind of a hassle.

Basicly i've got the following query:


200 - Alfa - Beta - Gamma
220 - Delta - Epsilon - Etc

Basicly what i want is an input field where people have to type: 200

Whereafter 3 text boxes display those values underneath eachother (Access
has to lookup these values).

I'm having trouble to make the 3 text boxes rely on that one textbox.

Greets & Thanks,
Gunti
 
W

Wayne-I-M

Thats a bad idea - if you have more than 1 person living at the hous (or even
in a numnber of houses within a postcode) the code will fail.

I would suggest either filtering the form by setting the criteria for the
postcode control.
Open the query in design view. Right click the criteria row of the postcode
column. Select build. Select the form from the dropdown on the left.
Select the postcode control of that form. Click Paste.
Or
Create 2 forms
Form with postcode only (pop-up)
Another form with the details you want of the people within that postcode.
Name, address, etc, etc

Open the postcode form in design view - from the toolbox select subform and
click somewhere on the form. From the list slect the other form (the one
with the details). Link the forms with the postcode (which much be on both
forms)
Set the details form to continous ion case there is more that one person.
In the format colum of the properties box select record selector = yes. Use
the OnClick of the form to go to another form showing only that person's
details and whatever else you need.


--
Wayne
Trentino, Italia.



Gunti said:
PostcodeInput

that's the name

Greets

Wayne-I-M said:
If you have the primary field (from the table) shown in a control on your
form - post the name of that control

Create a textbox and give it some name that means somethig to you - post the
name of the tetxbox


--
Wayne
Trentino, Italia.



Gunti said:
Thanks for your reply. The problem i have is that i, for example, have no
clue how to either: Point the criteria to the form control. The wizard also
won't show up if i create a text box.

Greets,
Gunti

:

There are quite afew methods to do this

You could filter the query
In the query use the criteria row and point to the form control

You could use a mainform subform which sub linked to the main by the ID (the
control input I assume)

you could use the wizard which would give you something like this as the
afterupdate event of your text box.

Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDField] = " & Str(Nz(Me![ControlName], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

In this case I assume that 200, 220, etc are based on the primary field in
the table

etc
etc
etc
you need to give more details to get a more specific answer - but hope this
points you in the right direction




--
Wayne
Trentino, Italia.



:

Hello,
I'm starting out with Access and it's being kind of a hassle.

Basicly i've got the following query:


200 - Alfa - Beta - Gamma
220 - Delta - Epsilon - Etc

Basicly what i want is an input field where people have to type: 200

Whereafter 3 text boxes display those values underneath eachother (Access
has to lookup these values).

I'm having trouble to make the 3 text boxes rely on that one textbox.

Greets & Thanks,
Gunti
 
G

Gunti

What i'm aiming for is for people to put in a Postcal code, and Access has to
return the person responsible, his telephone number etc.

I did exactly what you said in the beginning (starting to learn more and
more). Currently when i'm in design mode. I see all the field, however. When
i go to form mode, i get an empty screen (just the plain background). No
controls or anything.

Any idea why??

Greets and thanks alot,
Gunti

Wayne-I-M said:
Thats a bad idea - if you have more than 1 person living at the hous (or even
in a numnber of houses within a postcode) the code will fail.

I would suggest either filtering the form by setting the criteria for the
postcode control.
Open the query in design view. Right click the criteria row of the postcode
column. Select build. Select the form from the dropdown on the left.
Select the postcode control of that form. Click Paste.
Or
Create 2 forms
Form with postcode only (pop-up)
Another form with the details you want of the people within that postcode.
Name, address, etc, etc

Open the postcode form in design view - from the toolbox select subform and
click somewhere on the form. From the list slect the other form (the one
with the details). Link the forms with the postcode (which much be on both
forms)
Set the details form to continous ion case there is more that one person.
In the format colum of the properties box select record selector = yes. Use
the OnClick of the form to go to another form showing only that person's
details and whatever else you need.


--
Wayne
Trentino, Italia.



Gunti said:
PostcodeInput

that's the name

Greets

Wayne-I-M said:
If you have the primary field (from the table) shown in a control on your
form - post the name of that control

Create a textbox and give it some name that means somethig to you - post the
name of the tetxbox


--
Wayne
Trentino, Italia.



:

Thanks for your reply. The problem i have is that i, for example, have no
clue how to either: Point the criteria to the form control. The wizard also
won't show up if i create a text box.

Greets,
Gunti

:

There are quite afew methods to do this

You could filter the query
In the query use the criteria row and point to the form control

You could use a mainform subform which sub linked to the main by the ID (the
control input I assume)

you could use the wizard which would give you something like this as the
afterupdate event of your text box.

Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDField] = " & Str(Nz(Me![ControlName], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

In this case I assume that 200, 220, etc are based on the primary field in
the table

etc
etc
etc
you need to give more details to get a more specific answer - but hope this
points you in the right direction




--
Wayne
Trentino, Italia.



:

Hello,
I'm starting out with Access and it's being kind of a hassle.

Basicly i've got the following query:


200 - Alfa - Beta - Gamma
220 - Delta - Epsilon - Etc

Basicly what i want is an input field where people have to type: 200

Whereafter 3 text boxes display those values underneath eachother (Access
has to lookup these values).

I'm having trouble to make the 3 text boxes rely on that one textbox.

Greets & Thanks,
Gunti
 
D

Douglas J. Steele

Getting an empty screen usually means that the bound recordset contains no
records. In other words, no match was found.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Gunti said:
What i'm aiming for is for people to put in a Postcal code, and Access has
to
return the person responsible, his telephone number etc.

I did exactly what you said in the beginning (starting to learn more and
more). Currently when i'm in design mode. I see all the field, however.
When
i go to form mode, i get an empty screen (just the plain background). No
controls or anything.

Any idea why??

Greets and thanks alot,
Gunti

Wayne-I-M said:
Thats a bad idea - if you have more than 1 person living at the hous (or
even
in a numnber of houses within a postcode) the code will fail.

I would suggest either filtering the form by setting the criteria for the
postcode control.
Open the query in design view. Right click the criteria row of the
postcode
column. Select build. Select the form from the dropdown on the left.
Select the postcode control of that form. Click Paste.
Or
Create 2 forms
Form with postcode only (pop-up)
Another form with the details you want of the people within that
postcode.
Name, address, etc, etc

Open the postcode form in design view - from the toolbox select subform
and
click somewhere on the form. From the list slect the other form (the one
with the details). Link the forms with the postcode (which much be on
both
forms)
Set the details form to continous ion case there is more that one person.
In the format colum of the properties box select record selector = yes.
Use
the OnClick of the form to go to another form showing only that person's
details and whatever else you need.


--
Wayne
Trentino, Italia.



Gunti said:
PostcodeInput

that's the name

Greets

:

If you have the primary field (from the table) shown in a control on
your
form - post the name of that control

Create a textbox and give it some name that means somethig to you -
post the
name of the tetxbox


--
Wayne
Trentino, Italia.



:

Thanks for your reply. The problem i have is that i, for example,
have no
clue how to either: Point the criteria to the form control. The
wizard also
won't show up if i create a text box.

Greets,
Gunti

:

There are quite afew methods to do this

You could filter the query
In the query use the criteria row and point to the form control

You could use a mainform subform which sub linked to the main by
the ID (the
control input I assume)

you could use the wizard which would give you something like this
as the
afterupdate event of your text box.

Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDField] = " & Str(Nz(Me![ControlName], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

In this case I assume that 200, 220, etc are based on the primary
field in
the table

etc
etc
etc
you need to give more details to get a more specific answer - but
hope this
points you in the right direction




--
Wayne
Trentino, Italia.



:

Hello,
I'm starting out with Access and it's being kind of a hassle.

Basicly i've got the following query:


200 - Alfa - Beta - Gamma
220 - Delta - Epsilon - Etc

Basicly what i want is an input field where people have to
type: 200

Whereafter 3 text boxes display those values underneath
eachother (Access
has to lookup these values).

I'm having trouble to make the 3 text boxes rely on that one
textbox.

Greets & Thanks,
Gunti
 
G

Gunti

I finally got what i wanted. I used the combo box wizard.

Thanks for all your help, i learned alot from trying to figure this out
anyway :)

Greetings,
Gunti

Douglas J. Steele said:
Getting an empty screen usually means that the bound recordset contains no
records. In other words, no match was found.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Gunti said:
What i'm aiming for is for people to put in a Postcal code, and Access has
to
return the person responsible, his telephone number etc.

I did exactly what you said in the beginning (starting to learn more and
more). Currently when i'm in design mode. I see all the field, however.
When
i go to form mode, i get an empty screen (just the plain background). No
controls or anything.

Any idea why??

Greets and thanks alot,
Gunti

Wayne-I-M said:
Thats a bad idea - if you have more than 1 person living at the hous (or
even
in a numnber of houses within a postcode) the code will fail.

I would suggest either filtering the form by setting the criteria for the
postcode control.
Open the query in design view. Right click the criteria row of the
postcode
column. Select build. Select the form from the dropdown on the left.
Select the postcode control of that form. Click Paste.
Or
Create 2 forms
Form with postcode only (pop-up)
Another form with the details you want of the people within that
postcode.
Name, address, etc, etc

Open the postcode form in design view - from the toolbox select subform
and
click somewhere on the form. From the list slect the other form (the one
with the details). Link the forms with the postcode (which much be on
both
forms)
Set the details form to continous ion case there is more that one person.
In the format colum of the properties box select record selector = yes.
Use
the OnClick of the form to go to another form showing only that person's
details and whatever else you need.


--
Wayne
Trentino, Italia.



:

PostcodeInput

that's the name

Greets

:

If you have the primary field (from the table) shown in a control on
your
form - post the name of that control

Create a textbox and give it some name that means somethig to you -
post the
name of the tetxbox


--
Wayne
Trentino, Italia.



:

Thanks for your reply. The problem i have is that i, for example,
have no
clue how to either: Point the criteria to the form control. The
wizard also
won't show up if i create a text box.

Greets,
Gunti

:

There are quite afew methods to do this

You could filter the query
In the query use the criteria row and point to the form control

You could use a mainform subform which sub linked to the main by
the ID (the
control input I assume)

you could use the wizard which would give you something like this
as the
afterupdate event of your text box.

Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDField] = " & Str(Nz(Me![ControlName], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

In this case I assume that 200, 220, etc are based on the primary
field in
the table

etc
etc
etc
you need to give more details to get a more specific answer - but
hope this
points you in the right direction




--
Wayne
Trentino, Italia.



:

Hello,
I'm starting out with Access and it's being kind of a hassle.

Basicly i've got the following query:


200 - Alfa - Beta - Gamma
220 - Delta - Epsilon - Etc

Basicly what i want is an input field where people have to
type: 200

Whereafter 3 text boxes display those values underneath
eachother (Access
has to lookup these values).

I'm having trouble to make the 3 text boxes rely on that one
textbox.

Greets & Thanks,
Gunti
 

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

Top