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