RE: How to Retrieve and diplay the details in the form
- From: naveen prasad <naveenprasad@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Sep 2009 11:20:01 -0700
yes I have done this, in this case it is display the related fields with
correct values.
but when added a sub form to main form, and tried to add some values in sub
form and save it, that time it is displaying a message duplicate values may
be enter pls check , and also account number of main form is not added to
table d2 even i did relationship between d1 and d2.
i am little bit confused with this and also with main form and sub form
alignment.
kindly give me simple solution pls...
regards
"KARL DEWEY" wrote:
.account number the appropriate fields are not changing.created a combo box in f1 and bounded to ac_no of d1, but when i change the
Did you add an After Update event to to Requery?
--
Build a little, test a little.
"naveen prasad" wrote:
Hi karl, i have tried the same as you described.
I found 2 problems in that.
as you said, created forms of d1 and d2 as f1 and f2, and then add f2 as
subform to f1.
problem 1. when i created form f1 through d1, fields are automatically
created and all are textboxes created.
here as you said there is no combo box generated in f1, i manually deleted
the generated ac_no textbox and created a combo box in f1 and bounded to
ac_no of d1,
but when i change the account number the appropriate fields are not changing.
problem 2. The form design is not looking good, as it clearly showing there
are 2 different forms added in 1 form, difficult in alignment and other
factors also..
I kindly request you to tell me other simple method with out all these
process.
a simple query in textbox of ac_no keypress/enter event to run a query
and get the values of d1 and display in other fields in the form.
pls give me source code
regards
"naveen prasad" wrote:
noted, i will try the same and will come back to you
"KARL DEWEY" wrote:
There is no need to scroll, use the combo Auto Expand property. It scrolls
to the value or part of the value as you type in the combo.
Type 'ada' and it automatically goes to display --
Ada
Adael
Adam
Adams
unless there is no Ada then it would be at Adzela
Use this in the Row Source of the Combo --
SELECT ac_no
FROM d1;
--
Build a little, test a little.
"naveen prasad" wrote:
karl I tried the same as you described but the problem is i have morethan
6000 account numbers , i cannot scroll to that particular account which i
need every time.
It is better to have a code so that it will take the account number from
textbox, and when enter key is pressed behind the screen it will run the
query which gets the info from table d1 and displays the appropriate values
in the remaining text fields
Kindly help me how to write code to connect to database and how to execute
the sql select query in textbox field keypress.
regards
"KARL DEWEY" wrote:
Table d2 does not need to repeat the fields of d1 except for account no.
First open table d1 and make account no the primary key by click on the icon
that is a gold key and save.
You need to set a relationship between the two tables. Open the
relationship window, select both tables, click on the account no field of
table d1 and drag to account no field of d2. Double click the connecting
line. Select Referential Integerity and Cascade Update.
Create form to display all the fields of d2 but set the Visible property of
account no to No.
Create form to display all the fields of d1 and leave open space at the
bottom.
Add the form that has d2 fields as a subform. Set the Master/Child link
using the account no.
When you scroll the main form to the account number you want to view/enter
details the subform will display. When you add a new record to the subform
it automatically adds the account no from the main form.
--
Build a little, test a little.
"naveen prasad" wrote:
Dear karl thanks for your kind reply.
I would like to add some more info regarding my problem
TOTAL TABLES CREATED ARE 2 D1,D2
d1 has 4 fields are mentioned previously.
d2 has 10 fields out of this 4 fields are same as in d1.
d1 is master file which has all information of account_no and other fields
info.
now to put data in d2, i have created a from taking d2 as table so as to add
more info in d2 table.
i.e form fields are all now bound to d2 table.
i will enter account no in form text box, here i want to display the rest 3
fields taking info from d1,
i will enter manually the balance 6 fields and that record will be saved in
d2.
kindly help me with proper code info also how to make this possible
"KARL DEWEY" wrote:
Change your method.
Use query to feed form to display the information. In form header add
unbound combo with source --
SELECT ac_no FROM d1 GROUP BY ac_no;
Set the Auto Expand property to Yes.
For the Efter Update event use DoCmd Requery
Add criteria to query like this --
[Forms]![YourFormName]![ComboName]
--
Build a little, test a little.
"naveen prasad" wrote:
Dear all
good day....
pls help me here.
I have created a table d1
d1 fields ac_no cust_name addr_1 tel_no
now i have created a form with 4 textboxes t1,t2,t3,t4
Note all are unbound.
Now what i require is when i enter acccount no in t1 and press enter
It should display the matched criteria details in the rest of the textboxes.
cust_name in t2, addr_1 in t3, tel_no in t4.
Highly appreciated if you could give me complete description with code also
how to make it possible.
regards
- Follow-Ups:
- RE: How to Retrieve and diplay the details in the form
- From: KARL DEWEY
- RE: How to Retrieve and diplay the details in the form
- References:
- How to Retrieve and diplay the details in the form
- From: naveen prasad
- RE: How to Retrieve and diplay the details in the form
- From: KARL DEWEY
- RE: How to Retrieve and diplay the details in the form
- From: naveen prasad
- RE: How to Retrieve and diplay the details in the form
- From: KARL DEWEY
- RE: How to Retrieve and diplay the details in the form
- From: naveen prasad
- RE: How to Retrieve and diplay the details in the form
- From: KARL DEWEY
- RE: How to Retrieve and diplay the details in the form
- From: naveen prasad
- RE: How to Retrieve and diplay the details in the form
- From: naveen prasad
- RE: How to Retrieve and diplay the details in the form
- From: KARL DEWEY
- How to Retrieve and diplay the details in the form
- Prev by Date: Re: SQL statement in the table
- Next by Date: Re: Partial match Join query
- Previous by thread: RE: How to Retrieve and diplay the details in the form
- Next by thread: RE: How to Retrieve and diplay the details in the form
- Index(es):
Relevant Pages
|