How to Retrieve and diplay the details in the form

N

naveen prasad

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
 
K

KARL DEWEY

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]
 
N

naveen prasad

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 said:
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 said:
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
 
K

KARL DEWEY

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 said:
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 said:
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 said:
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
 
N

naveen prasad

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 said:
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 said:
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 said:
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.


:

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
 
K

KARL DEWEY

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 said:
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 said:
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 said:
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



:

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.


:

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
 
N

naveen prasad

noted, i will try the same and will come back to you

KARL DEWEY said:
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 said:
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 said:
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.


:

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



:

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.


:

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
 
N

naveen prasad

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 said:
noted, i will try the same and will come back to you

KARL DEWEY said:
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 said:
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



:

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.


:

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



:

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.


:

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
 
K

KARL DEWEY

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.

Did you add an After Update event to to Requery?

--
Build a little, test a little.


naveen prasad said:
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 said:
noted, i will try the same and will come back to you

KARL DEWEY said:
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.


:

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



:

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.


:

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



:

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.


:

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
 
N

naveen prasad

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 said:
account number the appropriate fields are not changing.

Did you add an After Update event to to Requery?

--
Build a little, test a little.


naveen prasad said:
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 said:
noted, i will try the same and will come back to you

:

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.


:

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



:

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.


:

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



:

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.


:

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
 
K

KARL DEWEY

It takes more than setting the relationship.

Did you set the Master/Child links between main and subform?

--
Build a little, test a little.


naveen prasad said:
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 said:
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.

Did you add an After Update event to to Requery?

--
Build a little, test a little.


naveen prasad said:
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




:

noted, i will try the same and will come back to you

:

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.


:

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



:

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.


:

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



:

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.


:

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
 
N

naveen prasad

Dear Yes it is linked automatically,



KARL DEWEY said:
It takes more than setting the relationship.

Did you set the Master/Child links between main and subform?

--
Build a little, test a little.


naveen prasad said:
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 said:
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.

Did you add an After Update event to to Requery?

--
Build a little, test a little.


:

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




:

noted, i will try the same and will come back to you

:

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.


:

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



:

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.


:

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



:

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.


:

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
 
K

KARL DEWEY

Put the unbound combo in the main form header, use it as criteria in the
query for the main form.
--
Build a little, test a little.


naveen prasad said:
Dear Yes it is linked automatically,



KARL DEWEY said:
It takes more than setting the relationship.

Did you set the Master/Child links between main and subform?

--
Build a little, test a little.


naveen prasad said:
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

:

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.

Did you add an After Update event to to Requery?

--
Build a little, test a little.


:

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




:

noted, i will try the same and will come back to you

:

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.


:

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



:

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.


:

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



:

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.


:

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
 
N

naveen prasad

Karl good day...
some how I solved my problem in a different way..., but 2 small issues

like i have created a small command button cmb1 in form f2, when we click
this button small form f1 will appear which when opened will take the account
no from f2 into f2 account text box and displays the corresponding details,

Here I have 2 small problems , like Null value, and other small problem is
with date criteria.

problem 1. I have written for f2 when opened as

combo1.text = forms!f1!ac_no;

This is working excellent and iam getting the result, but when combo1 is
null and if i click the button iam getting error as forms!f1!ac_no is null ,
debug,
what i want is if ac_no.text is null , the form f2 should open and just
setfocus on combo1

plz help me how to handle this error.



problem 2: in a form i have created 5 textboxes, t1,t2,t3,t4,t5

t1,t2 i have made format as medium time. which will take the request time &
action time.

i have also written code for lostfocus in t2 as
if t2.value < t2.value then
msgbox "action time can't be less than request time"
t2.setfocus
end if

here iam getting the msg properly, but it is going to setfocus on t2,
jumping to t3 how can i handle this...


pls give me solution


regards





KARL DEWEY said:
Put the unbound combo in the main form header, use it as criteria in the
query for the main form.
--
Build a little, test a little.


naveen prasad said:
Dear Yes it is linked automatically,



KARL DEWEY said:
It takes more than setting the relationship.

Did you set the Master/Child links between main and subform?

--
Build a little, test a little.


:


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

:

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.

Did you add an After Update event to to Requery?

--
Build a little, test a little.


:

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




:

noted, i will try the same and will come back to you

:

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.


:

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



:

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.


:

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



:

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.


:

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
 
K

KARL DEWEY

I do not know VBA, I use macros.
--
Build a little, test a little.


naveen prasad said:
Karl good day...
some how I solved my problem in a different way..., but 2 small issues

like i have created a small command button cmb1 in form f2, when we click
this button small form f1 will appear which when opened will take the account
no from f2 into f2 account text box and displays the corresponding details,

Here I have 2 small problems , like Null value, and other small problem is
with date criteria.

problem 1. I have written for f2 when opened as

combo1.text = forms!f1!ac_no;

This is working excellent and iam getting the result, but when combo1 is
null and if i click the button iam getting error as forms!f1!ac_no is null ,
debug,
what i want is if ac_no.text is null , the form f2 should open and just
setfocus on combo1

plz help me how to handle this error.



problem 2: in a form i have created 5 textboxes, t1,t2,t3,t4,t5

t1,t2 i have made format as medium time. which will take the request time &
action time.

i have also written code for lostfocus in t2 as
if t2.value < t2.value then
msgbox "action time can't be less than request time"
t2.setfocus
end if

here iam getting the msg properly, but it is going to setfocus on t2,
jumping to t3 how can i handle this...


pls give me solution


regards





KARL DEWEY said:
Put the unbound combo in the main form header, use it as criteria in the
query for the main form.
--
Build a little, test a little.


naveen prasad said:
Dear Yes it is linked automatically,



:

It takes more than setting the relationship.

Did you set the Master/Child links between main and subform?

--
Build a little, test a little.


:


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

:

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.

Did you add an After Update event to to Requery?

--
Build a little, test a little.


:

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




:

noted, i will try the same and will come back to you

:

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.


:

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



:

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.


:

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



:

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.


:

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
 
N

naveen prasad

ok karl thankyou,

others kindly help me

naveen prasad said:
Karl good day...
some how I solved my problem in a different way..., but 2 small issues

like i have created a small command button cmb1 in form f2, when we click
this button small form f1 will appear which when opened will take the account
no from f2 into f2 account text box and displays the corresponding details,

Here I have 2 small problems , like Null value, and other small problem is
with date criteria.

problem 1. I have written for f2 when opened as

combo1.text = forms!f1!ac_no;

This is working excellent and iam getting the result, but when combo1 is
null and if i click the button iam getting error as forms!f1!ac_no is null ,
debug,
what i want is if ac_no.text is null , the form f2 should open and just
setfocus on combo1

plz help me how to handle this error.



problem 2: in a form i have created 5 textboxes, t1,t2,t3,t4,t5

t1,t2 i have made format as medium time. which will take the request time &
action time.

i have also written code for lostfocus in t2 as
if t2.value < t2.value then
msgbox "action time can't be less than request time"
t2.setfocus
end if

here iam getting the msg properly, but it is going to setfocus on t2,
jumping to t3 how can i handle this...


pls give me solution


regards





KARL DEWEY said:
Put the unbound combo in the main form header, use it as criteria in the
query for the main form.
--
Build a little, test a little.


naveen prasad said:
Dear Yes it is linked automatically,



:

It takes more than setting the relationship.

Did you set the Master/Child links between main and subform?

--
Build a little, test a little.


:


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

:

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.

Did you add an After Update event to to Requery?

--
Build a little, test a little.


:

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




:

noted, i will try the same and will come back to you

:

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.


:

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



:

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.


:

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



:

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.


:

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
 

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