Lost

  • Thread starter Thread starter Court
  • Start date Start date
C

Court

I try to avoid VB at all costs because I can never get
things to work in it. It states that it cannot find the
field mentioned in this code. Please let me know if I am
misinterpreting the code.

If Len(Me!insert name of customer field)>0 Then
Me!insert name of account field = Me!insert name of
customer field.Column(0)
Me!insert name of customer field = Me!insert name of
customer field.Column(1)
End if (nothing is supposed to follow end if)

What makes a field bound? I am self taught. I'm sure I
know how to do it, but I don't know what it is called.

Additionally, could it be my settings for these fields
causing a problem? Should I establish a relationship?
What about the lookup parameters? What should they be?

Aside from advising me to take a Visual Basic/Access
class (already considering it), what parameters impact
the correct functioning of this code.



Subject: Re: Last Hope
From: "SA" <[email protected]> Sent: 11/18/2003
6:23:28 AM

Court

Assuming that the Customer name is a bound field on your
form for table 1,
then in the combo drop down that is based on table 2, in
the After Update
event add code like this:

Assuming that column 0 of the combo is the Account number
and column 1 is
the customer name:

If Len(Me!cboCustomerLookUp)>0 Then
Me!AccountNumber = Me!cboCustomerLookup.Column(0)
Me!CustomerName = Me!cboCustomerLookup.Column(1)
End if
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

message
I have a table with four fields in it. I called it Table
1.
Customer Name (Text)
Account Number (Number)
Phone number (Number)
e-mail address (Text)
Amount (Number)

I have a second table (Named Table 2) with two fields on
it. It serves as a master list for all of our customers.
Customer Name (Text)
Account Number (Number)

I have created a form for easier and more attractive data
entry. I would like to create a combo box for the
account number that pulls from Table 2 and documents it
in Table 1. I would then like for it to, automatically,
populate the customer name in a separate text box on the
form based on the account number in my master list (Table
2). Once the form autopopulates with the customer name,
I would like for that name to go to Table 1.

I know how to create a two column drop down, but I really
would like for the customer name to auto-populate in a
separate field.

I hope I have included enough information. If I haven't,
please let me know what you need because I don't know
what else to share.

Thanks a million.


..
 
-----Original Message-----
I try to avoid VB at all costs because I can never get
things to work in it. It states that it cannot find the
field mentioned in this code. Please let me know if I am
misinterpreting the code.

If Len(Me!insert name of customer field)>0 Then
Me!insert name of account field = Me!insert name of
customer field.Column(0)
Me!insert name of customer field = Me!insert name of
customer field.Column(1)
End if (nothing is supposed to follow end if)

What makes a field bound? I am self taught. I'm sure I
know how to do it, but I don't know what it is called.

Additionally, could it be my settings for these fields
causing a problem? Should I establish a relationship?
What about the lookup parameters? What should they be?

Aside from advising me to take a Visual Basic/Access
class (already considering it), what parameters impact
the correct functioning of this code.



Subject: Re: Last Hope
From: "SA" <[email protected]> Sent: 11/18/2003
6:23:28 AM

Court

Assuming that the Customer name is a bound field on your
form for table 1,
then in the combo drop down that is based on table 2, in
the After Update
event add code like this:

Assuming that column 0 of the combo is the Account number
and column 1 is
the customer name:

If Len(Me!cboCustomerLookUp)>0 Then
Me!AccountNumber = Me!cboCustomerLookup.Column(0)
Me!CustomerName = Me!cboCustomerLookup.Column(1)
End if
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

message
if this is the actual name of the field:
Me!insert name of account field
then do this
Me![insert name of account field]

No embedded spaces without enclosing brackets
also sometimes required when field name is same as a
reserved word (name,index, etc)

Kip
 
Back
Top