linking fields in a form.

  • Thread starter Thread starter stephendeloach via AccessMonster.com
  • Start date Start date
S

stephendeloach via AccessMonster.com

Is there a way i can "link" fields in my form? I have a form with Operator,
LeaseName, Vendor, Rig, Parish, TDdate. What I need is when i enter LeaseName
- Cromer #10 then in the others it knows to put in the Vendor, Rig, Parish,
etc... is that possible?
 
Do you want fields to fill up automatically when you enter the LeaseName if
the record already exists for that leaseName? look at Autolookup query in the
help menu in access. it is very specific, and if you are keeping all the
fields in the same table this won't be possible (ie, you need 2 tables with
one to many relationship for autolookup query to work).

However, if you are keeping all your field in the same table, you might want
to create a prompt. In criteria type [Enter LeaseName:] and every time you
open the form it will prompt you for the leaseName. If the Lease Name exists,
it will pull up the other fields you have selected in the form.

Does this help? Let me know if you have any questions.
 
Are you saying you want to automatically update fields?

If so, make the LeaseName field a combo and set the source of the query to
include all the fields you need. You will have to mess around with the format
properties. In the afterupdate event put

Vendor = [LeaseName].Column(1)

I think that should work. The number in the brackets is based on the first
column in the query equalling zero.
 
This is what we are having to do. Everytime we enter new info in the form,
were having to type in
LeaseName - Cromer #10
Vendor - Pettigrew
Operator - Nadel
Rig - Razorback

so what would really be a time saver since those fields will never change,
when you type in Cromer #10.. Vendor, Operator, Rig automatically come up
with the info...
Are you saying you want to automatically update fields?

If so, make the LeaseName field a combo and set the source of the query to
include all the fields you need. You will have to mess around with the format
properties. In the afterupdate event put

Vendor = [LeaseName].Column(1)

I think that should work. The number in the brackets is based on the first
column in the query equalling zero.
Is there a way i can "link" fields in my form? I have a form with Operator,
LeaseName, Vendor, Rig, Parish, TDdate. What I need is when i enter LeaseName
- Cromer #10 then in the others it knows to put in the Vendor, Rig, Parish,
etc... is that possible?
 
Read my answer again!

When you update the combo all the other fields will be updated automatically.



stephendeloach via AccessMonster.com said:
This is what we are having to do. Everytime we enter new info in the form,
were having to type in
LeaseName - Cromer #10
Vendor - Pettigrew
Operator - Nadel
Rig - Razorback

so what would really be a time saver since those fields will never change,
when you type in Cromer #10.. Vendor, Operator, Rig automatically come up
with the info...
Are you saying you want to automatically update fields?

If so, make the LeaseName field a combo and set the source of the query to
include all the fields you need. You will have to mess around with the format
properties. In the afterupdate event put

Vendor = [LeaseName].Column(1)

I think that should work. The number in the brackets is based on the first
column in the query equalling zero.
Is there a way i can "link" fields in my form? I have a form with Operator,
LeaseName, Vendor, Rig, Parish, TDdate. What I need is when i enter LeaseName
- Cromer #10 then in the others it knows to put in the Vendor, Rig, Parish,
etc... is that possible?
 
Ok. I dont really understand codeing and all that. This is what ive got..
Private Sub Combo38_AfterUpdate()
Vendor = [LeaseName].Column(1)

End Sub

and when I enter something in the LeaseName field i get this..
Run time error 438:
Object dosent support this property or method..

My Operator, LeaseName, Rig, and Vendor are already combo boxes if that helps
any...
Read my answer again!

When you update the combo all the other fields will be updated automatically.
This is what we are having to do. Everytime we enter new info in the form,
were having to type in
[quoted text clipped - 22 lines]
 
If I understand you correctly, you want to use the combo box to update the
others fields. Those other fields would be kept as text fields, not combos.

To make sure you have all the fields you need in the combo make the width of
each greater than zero then you will see the values for each record.

Or maybe you (or I) haven't been clear enough.

--
www.ae911truth.org



stephendeloach via AccessMonster.com said:
Ok. I dont really understand codeing and all that. This is what ive got..
Private Sub Combo38_AfterUpdate()
Vendor = [LeaseName].Column(1)

End Sub

and when I enter something in the LeaseName field i get this..
Run time error 438:
Object dosent support this property or method..

My Operator, LeaseName, Rig, and Vendor are already combo boxes if that helps
any...
Read my answer again!

When you update the combo all the other fields will be updated automatically.
This is what we are having to do. Everytime we enter new info in the form,
were having to type in
[quoted text clipped - 22 lines]
- Cromer #10 then in the others it knows to put in the Vendor, Rig, Parish,
etc... is that possible?
 
Back
Top