Find and Update Records

L

LiquorGuy

Hello,

I have a form that displays the follow fields
ID ClientID CompanyName Address City StateOrProvince PostalCode PhoneNumber

for some of our clients. I am trying to setup a command button on a Form
that allows the user to enter in the Client ID number or Company Name and
then updates that information in the form. I also have a subform within the
form that displays that company's orders. I need all this information to
update. Any suggestions? Would it be easier for me to use a command button,
a macro, or VB Code?

Thank you.
 
J

Jeff L

Update it to what? Is your form locked for editing and you need it
unlocked? Are you wanting to enter the ClientId and have that record
display on your screen? I think a little more info is needed.

If your form is bound to a record source, then your subform should be
linked to the form via one of the fields on the Main Form, my guess
would be ClientID. As you navigate from record to record, your subform
should show the related data in it. There shouldn't be anything that
you have to "update" if you have it set up properly.
 
L

LiquorGuy via AccessMonster.com

Sorry for the confusion. Ok i have a form that displays all those fields.. I
want to make it so that either upon entering the database, from i.e. a
switchboard or leaving the form the way it is, then i can have the user enter
in a clientid and the form update accordingly. Does this help?


Jeff said:
Update it to what? Is your form locked for editing and you need it
unlocked? Are you wanting to enter the ClientId and have that record
display on your screen? I think a little more info is needed.

If your form is bound to a record source, then your subform should be
linked to the form via one of the fields on the Main Form, my guess
would be ClientID. As you navigate from record to record, your subform
should show the related data in it. There shouldn't be anything that
you have to "update" if you have it set up properly.
[quoted text clipped - 9 lines]
Thank you.
 
J

Jeff L

I think the easiest way to do this, if I am understanding you
correctly, would be to create a combo box that lists your ClientIds
then when you select your ClientId, it brings up the correct record.

Create the combo box, and in the wizard select the option that says
something like "Find a record based on the value I selected". That
might not be the exact wording, but there are only three options so it
shouldn't be too difficult. Use the wizard to finish setting up your
combo box. Now when you select a value in the box, it should bring up
the appropriate record.

Hope that helps!


Sorry for the confusion. Ok i have a form that displays all those fields.. I
want to make it so that either upon entering the database, from i.e. a
switchboard or leaving the form the way it is, then i can have the user enter
in a clientid and the form update accordingly. Does this help?


Jeff said:
Update it to what? Is your form locked for editing and you need it
unlocked? Are you wanting to enter the ClientId and have that record
display on your screen? I think a little more info is needed.

If your form is bound to a record source, then your subform should be
linked to the form via one of the fields on the Main Form, my guess
would be ClientID. As you navigate from record to record, your subform
should show the related data in it. There shouldn't be anything that
you have to "update" if you have it set up properly.
[quoted text clipped - 9 lines]
Thank you.
 
L

LiquorGuy via AccessMonster.com

I created the combo box... In the header of the form and the actual form is
in the form field and when i selected the company name, the form didn't
update below the header. Is there a different way to design the form or
should I create a new form or something else?

Jeff said:
I think the easiest way to do this, if I am understanding you
correctly, would be to create a combo box that lists your ClientIds
then when you select your ClientId, it brings up the correct record.

Create the combo box, and in the wizard select the option that says
something like "Find a record based on the value I selected". That
might not be the exact wording, but there are only three options so it
shouldn't be too difficult. Use the wizard to finish setting up your
combo box. Now when you select a value in the box, it should bring up
the appropriate record.

Hope that helps!
Sorry for the confusion. Ok i have a form that displays all those fields.. I
want to make it so that either upon entering the database, from i.e. a
[quoted text clipped - 20 lines]
 
J

Jeff L

Your form needs to be attached to a Record Source for this to work
properly. Is it?

I created the combo box... In the header of the form and the actual form is
in the form field and when i selected the company name, the form didn't
update below the header. Is there a different way to design the form or
should I create a new form or something else?

Jeff said:
I think the easiest way to do this, if I am understanding you
correctly, would be to create a combo box that lists your ClientIds
then when you select your ClientId, it brings up the correct record.

Create the combo box, and in the wizard select the option that says
something like "Find a record based on the value I selected". That
might not be the exact wording, but there are only three options so it
shouldn't be too difficult. Use the wizard to finish setting up your
combo box. Now when you select a value in the box, it should bring up
the appropriate record.

Hope that helps!
Sorry for the confusion. Ok i have a form that displays all those fields.. I
want to make it so that either upon entering the database, from i.e. a
[quoted text clipped - 20 lines]
 
L

LiquorGuy via AccessMonster.com

Thank you!! I got the drop down box to correctly update the form to the
record selected. However, I would like to change the drop down menu now to a
search box/parameter query where the user can just type in the ClientID
number and then have the remaining fields update accordingly? Is there an
internal wizard that will convert the box from a combo box to a search field?
Or am I asking too much? *wink*

Jeff said:
Your form needs to be attached to a Record Source for this to work
properly. Is it?
I created the combo box... In the header of the form and the actual form is
in the form field and when i selected the company name, the form didn't
[quoted text clipped - 23 lines]
 
J

Jeff L

I guess I'm not sure what you are asking. You said that you got the
form to correctly update to the record selected. So I guess I don't
know what you mean when you say you want to update the other fields
accordingly. If your form is bound to a record source, and if your
fields on the form are bound to a field in your record source, they
should display automatically. I am failing to see the need for a
search field.


Thank you!! I got the drop down box to correctly update the form to the
record selected. However, I would like to change the drop down menu now to a
search box/parameter query where the user can just type in the ClientID
number and then have the remaining fields update accordingly? Is there an
internal wizard that will convert the box from a combo box to a search field?
Or am I asking too much? *wink*

Jeff said:
Your form needs to be attached to a Record Source for this to work
properly. Is it?
I created the combo box... In the header of the form and the actual form is
in the form field and when i selected the company name, the form didn't
[quoted text clipped - 23 lines]
 
L

LiquorGuy via AccessMonster.com

I have the Drop-Down box that updates the form based on CustomerID number...
However, suppose it have 2000+ Customers, it then becomes troublesome to
scroll through all the Customers to search for one record. Ideally, I want
someone to type in the CustomerID number, click a command button and then the
form either moves to the record or returns "Invalid Customer ID, Please re-
enter" or something of that nature.

Jeff said:
I guess I'm not sure what you are asking. You said that you got the
form to correctly update to the record selected. So I guess I don't
know what you mean when you say you want to update the other fields
accordingly. If your form is bound to a record source, and if your
fields on the form are bound to a field in your record source, they
should display automatically. I am failing to see the need for a
search field.
Thank you!! I got the drop down box to correctly update the form to the
record selected. However, I would like to change the drop down menu now to a
[quoted text clipped - 15 lines]
 
J

Jeff L

You shouldn't have to scroll through anything. Your dropdown box has
all your customer Ids. When you select one, it brings up the related
customer info. It doesn't matter if you have 5, 500, 5000, or 5000000
customers. You put in a CustomerId and it will bring back the correct
customer. You don't need to scroll and you don't need a command
button.

I have the Drop-Down box that updates the form based on CustomerID number...
However, suppose it have 2000+ Customers, it then becomes troublesome to
scroll through all the Customers to search for one record. Ideally, I want
someone to type in the CustomerID number, click a command button and then the
form either moves to the record or returns "Invalid Customer ID, Please re-
enter" or something of that nature.

Jeff said:
I guess I'm not sure what you are asking. You said that you got the
form to correctly update to the record selected. So I guess I don't
know what you mean when you say you want to update the other fields
accordingly. If your form is bound to a record source, and if your
fields on the form are bound to a field in your record source, they
should display automatically. I am failing to see the need for a
search field.
Thank you!! I got the drop down box to correctly update the form to the
record selected. However, I would like to change the drop down menu now to a
[quoted text clipped - 15 lines]
 
Top