Adding a Name and ID Together

B

Bob

I want to make a reference code for my clients,
On my Clients, Form/Table 2 of my fields OwnerID & OwnerLastName
ie:
23 Smith / how do a make a query to get Smi23
or
27 Brown Bro27
So first three letters in OwnerLastName and then his ID Number

Thanks in advance.........Bob Vance
 
J

JK

Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 
B

Bob

JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
JK said:
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK

Bob said:
I want to make a reference code for my clients,
On my Clients, Form/Table 2 of my fields OwnerID & OwnerLastName
ie:
23 Smith / how do a make a query to get Smi23
or
27 Brown Bro27
So first three letters in OwnerLastName and then his ID Number

Thanks in advance.........Bob Vance
 
J

JK

I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode: with
any other expression but always with colon :)) at the end

Regards/JK


Bob said:
JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
JK said:
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK

Bob said:
I want to make a reference code for my clients,
On my Clients, Form/Table 2 of my fields OwnerID & OwnerLastName
ie:
23 Smith / how do a make a query to get Smi23
or
27 Brown Bro27
So first three letters in OwnerLastName and then his ID Number

Thanks in advance.........Bob Vance
 
B

Bob

Brilliant JK worked, so now how do I get each form to show there individual
ref so then I can assign it to there statement ..thanks Bob
JK said:
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode: with
any other expression but always with colon :)) at the end

Regards/JK


Bob said:
JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
JK said:
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK



I want to make a reference code for my clients,
On my Clients, Form/Table 2 of my fields OwnerID & OwnerLastName
ie:
23 Smith / how do a make a query to get Smi23
or
27 Brown Bro27
So first three letters in OwnerLastName and then his ID Number

Thanks in advance.........Bob Vance
 
B

Bob

On my Client Info Form I created a List Box to show the client Reference ID
(Qry) but it show all of them how do I get it to assign to just that
particular Record in Forms..Thanks Bob

Bob said:
Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks Bob
JK said:
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode: with
any other expression but always with colon :)) at the end

Regards/JK


Bob said:
JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK



I want to make a reference code for my clients,
On my Clients, Form/Table 2 of my fields OwnerID & OwnerLastName
ie:
23 Smith / how do a make a query to get Smi23
or
27 Brown Bro27
So first three letters in OwnerLastName and then his ID Number

Thanks in advance.........Bob Vance
 
J

JK

Bob,

You can do it in one of the following:

1. Design (or modify the) form to be based on a query that includes the
calculated field
Or
2. In the existing form add a text box and in the Control Source (in the
Properties) to:
=Left([OwnerLastName],3) & [OwnerID]
(The equal sign is mandatory, without it you will get an error)

Regards/JK




Bob said:
Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks Bob
JK said:
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode: with
any other expression but always with colon :)) at the end

Regards/JK


Bob said:
JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 
J

JK

Bob,

Make sure that the form include OwnerID on it, I assume that OwnerID is
already on the query, if not add it.

Instead of a list box (delete it), create a combo (drop down) box based on
the query that includes the refCode and OwnerID. If you want to search, use
the third option of the wizard to do the work for you. Select refCode and
OwnerID at least

Give the combo box a name say, "CodePickList" (without quotation marks) .
In the *form* properties On Current create an Event procedure and insert in
it:

Me.CodePickList=Me.OwnerID


Regards/JK



Bob said:
On my Client Info Form I created a List Box to show the client Reference
ID (Qry) but it show all of them how do I get it to assign to just that
particular Record in Forms..Thanks Bob

Bob said:
Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks Bob
JK said:
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode:
with any other expression but always with colon :)) at the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK



I want to make a reference code for my clients,
On my Clients, Form/Table 2 of my fields OwnerID & OwnerLastName
ie:
23 Smith / how do a make a query to get Smi23
or
27 Brown Bro27
So first three letters in OwnerLastName and then his ID Number

Thanks in advance.........Bob Vance
 
B

Bob

JK, I cant get the Combo Box to hold a name instead it names it Combo97, And
this code to I entered it through Expression Builder or Code
Builder...Thanks Bob

JK said:
Bob,

Make sure that the form include OwnerID on it, I assume that OwnerID is
already on the query, if not add it.

Instead of a list box (delete it), create a combo (drop down) box based on
the query that includes the refCode and OwnerID. If you want to search,
use the third option of the wizard to do the work for you. Select refCode
and OwnerID at least

Give the combo box a name say, "CodePickList" (without quotation marks) .
In the *form* properties On Current create an Event procedure and insert
in it:

Me.CodePickList=Me.OwnerID


Regards/JK



Bob said:
On my Client Info Form I created a List Box to show the client Reference
ID (Qry) but it show all of them how do I get it to assign to just that
particular Record in Forms..Thanks Bob

Bob said:
Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks Bob
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode:
with any other expression but always with colon :)) at the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK



I want to make a reference code for my clients,
On my Clients, Form/Table 2 of my fields OwnerID & OwnerLastName
ie:
23 Smith / how do a make a query to get Smi23
or
27 Brown Bro27
So first three letters in OwnerLastName and then his ID Number

Thanks in advance.........Bob Vance
 
B

Bob

BRILLIANT JK just BRILLIANT I added the text box with the source control
=Left([OwnerLastName],3) & [OwnerID]
Just Brillant thanks for your help....Bob :) :)


JK said:
Bob,

You can do it in one of the following:

1. Design (or modify the) form to be based on a query that includes the
calculated field
Or
2. In the existing form add a text box and in the Control Source (in the
Properties) to:
=Left([OwnerLastName],3) & [OwnerID]
(The equal sign is mandatory, without it you will get an error)

Regards/JK




Bob said:
Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks Bob
JK said:
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode:
with any other expression but always with colon :)) at the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 
B

Bob

JK now that is is on my form how do I link that with my Report (Statement) I
have called the text box on my form ClientRef.....Thanks Bob

Bob said:
BRILLIANT JK just BRILLIANT I added the text box with the source control
=Left([OwnerLastName],3) & [OwnerID]
Just Brillant thanks for your help....Bob :) :)


JK said:
Bob,

You can do it in one of the following:

1. Design (or modify the) form to be based on a query that includes the
calculated field
Or
2. In the existing form add a text box and in the Control Source (in the
Properties) to:
=Left([OwnerLastName],3) & [OwnerID]
(The equal sign is mandatory, without it you will get an error)

Regards/JK




Bob said:
Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks Bob
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode:
with any other expression but always with colon :)) at the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 
J

JK

Bob,

Why link?, just add a calculated field to the report. Will that do the
trick?
(make it invisible if you don't want it printed)

Regards

Bob said:
JK now that is is on my form how do I link that with my Report (Statement)
I have called the text box on my form ClientRef.....Thanks Bob

Bob said:
BRILLIANT JK just BRILLIANT I added the text box with the source control
=Left([OwnerLastName],3) & [OwnerID]
Just Brillant thanks for your help....Bob :) :)


JK said:
Bob,

You can do it in one of the following:

1. Design (or modify the) form to be based on a query that includes the
calculated field
Or
2. In the existing form add a text box and in the Control Source (in the
Properties) to:
=Left([OwnerLastName],3) & [OwnerID]
(The equal sign is mandatory, without it you will get an error)

Regards/JK




Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks Bob
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode:
with any other expression but always with colon :)) at the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 
J

JK

My pleasure

Bob said:
JK, I cant get the Combo Box to hold a name instead it names it Combo97,
And this code to I entered it through Expression Builder or Code
Builder...Thanks Bob

JK said:
Bob,

Make sure that the form include OwnerID on it, I assume that OwnerID is
already on the query, if not add it.

Instead of a list box (delete it), create a combo (drop down) box based
on the query that includes the refCode and OwnerID. If you want to
search, use the third option of the wizard to do the work for you. Select
refCode and OwnerID at least

Give the combo box a name say, "CodePickList" (without quotation marks) .
In the *form* properties On Current create an Event procedure and insert
in it:

Me.CodePickList=Me.OwnerID


Regards/JK



Bob said:
On my Client Info Form I created a List Box to show the client Reference
ID (Qry) but it show all of them how do I get it to assign to just that
particular Record in Forms..Thanks Bob

Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks Bob
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode:
with any other expression but always with colon :)) at the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK



I want to make a reference code for my clients,
On my Clients, Form/Table 2 of my fields OwnerID & OwnerLastName
ie:
23 Smith / how do a make a query to get Smi23
or
27 Brown Bro27
So first three letters in OwnerLastName and then his ID Number

Thanks in advance.........Bob Vance
 
B

Bob

JK Got the Combo box working now had to change OwnerID to ClientRef to show
the code, Great now I am going to try to link that to my Report..Thanks Bob

Bob said:
JK now that is is on my form how do I link that with my Report (Statement)
I have called the text box on my form ClientRef.....Thanks Bob

Bob said:
BRILLIANT JK just BRILLIANT I added the text box with the source control
=Left([OwnerLastName],3) & [OwnerID]
Just Brillant thanks for your help....Bob :) :)


JK said:
Bob,

You can do it in one of the following:

1. Design (or modify the) form to be based on a query that includes the
calculated field
Or
2. In the existing form add a text box and in the Control Source (in the
Properties) to:
=Left([OwnerLastName],3) & [OwnerID]
(The equal sign is mandatory, without it you will get an error)

Regards/JK




Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks Bob
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode:
with any other expression but always with colon :)) at the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 
B

Bob

Calculated Field How do I go about that . I want to be able to Print it on
the Report....Thanks Bob

JK said:
Bob,

Why link?, just add a calculated field to the report. Will that do the
trick?
(make it invisible if you don't want it printed)

Regards

Bob said:
JK now that is is on my form how do I link that with my Report
(Statement) I have called the text box on my form ClientRef.....Thanks
Bob

Bob said:
BRILLIANT JK just BRILLIANT I added the text box with the source control
=Left([OwnerLastName],3) & [OwnerID]
Just Brillant thanks for your help....Bob :) :)


Bob,

You can do it in one of the following:

1. Design (or modify the) form to be based on a query that includes the
calculated field
Or
2. In the existing form add a text box and in the Control Source (in
the Properties) to:
=Left([OwnerLastName],3) & [OwnerID]
(The equal sign is mandatory, without it you will get an error)

Regards/JK




Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks Bob
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode:
with any other expression but always with colon :)) at the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 
B

Bob

On my Report this is what the Name code looks like
=IIf(DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" & [tbOwnerID])="" Or
IsNull(DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" &
[tbOwnerID])),"",DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" &
[tbOwnerID]) & " ") &

Bob said:
Calculated Field How do I go about that . I want to be able to Print it on
the Report....Thanks Bob

JK said:
Bob,

Why link?, just add a calculated field to the report. Will that do the
trick?
(make it invisible if you don't want it printed)

Regards

Bob said:
JK now that is is on my form how do I link that with my Report
(Statement) I have called the text box on my form ClientRef.....Thanks
Bob

BRILLIANT JK just BRILLIANT I added the text box with the source
control
=Left([OwnerLastName],3) & [OwnerID]
Just Brillant thanks for your help....Bob :) :)


Bob,

You can do it in one of the following:

1. Design (or modify the) form to be based on a query that includes
the calculated field
Or
2. In the existing form add a text box and in the Control Source (in
the Properties) to:
=Left([OwnerLastName],3) & [OwnerID]
(The equal sign is mandatory, without it you will get an error)

Regards/JK




Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks
Bob
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing refCode:
with any other expression but always with colon :)) at the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do from
there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 
J

JK

Bob,

This is incomplete code but I get the idea.

What is your report based on (query/table)?
Is this code in a page header, body or what? (looks like header to me)

From the code it appears that the report is not based on tblOwnerInfo but
only looks at it. This being the case the source code of the code is
slightly different:

=Left(Dlookup("[OwnerLastName]","tblOwnerInfo","[OwnerID]=" & [OwnerID]),3)
& [OwnerID]

Regards


Bob said:
On my Report this is what the Name code looks like
=IIf(DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" & [tbOwnerID])="" Or
IsNull(DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" &
[tbOwnerID])),"",DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" &
[tbOwnerID]) & " ") &

Bob said:
Calculated Field How do I go about that . I want to be able to Print it
on the Report....Thanks Bob

JK said:
Bob,

Why link?, just add a calculated field to the report. Will that do the
trick?
(make it invisible if you don't want it printed)

Regards

JK now that is is on my form how do I link that with my Report
(Statement) I have called the text box on my form ClientRef.....Thanks
Bob

BRILLIANT JK just BRILLIANT I added the text box with the source
control
=Left([OwnerLastName],3) & [OwnerID]
Just Brillant thanks for your help....Bob :) :)


Bob,

You can do it in one of the following:

1. Design (or modify the) form to be based on a query that includes
the calculated field
Or
2. In the existing form add a text box and in the Control Source (in
the Properties) to:
=Left([OwnerLastName],3) & [OwnerID]
(The equal sign is mandatory, without it you will get an error)

Regards/JK




Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks
Bob
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing
refCode: with any other expression but always with colon :)) at the
end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do
from there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 
B

Bob

Yes JK this is in the header and Owner and Client mean the same thing, this
is the Clients name for his statement, there is an address box below
that..Thanks Bob
JK said:
Bob,

This is incomplete code but I get the idea.

What is your report based on (query/table)?
Is this code in a page header, body or what? (looks like header to me)

From the code it appears that the report is not based on tblOwnerInfo but
only looks at it. This being the case the source code of the code is
slightly different:

=Left(Dlookup("[OwnerLastName]","tblOwnerInfo","[OwnerID]=" &
[OwnerID]),3) & [OwnerID]

Regards


Bob said:
On my Report this is what the Name code looks like
=IIf(DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" & [tbOwnerID])="" Or
IsNull(DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" &
[tbOwnerID])),"",DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" &
[tbOwnerID]) & " ") &

Bob said:
Calculated Field How do I go about that . I want to be able to Print it
on the Report....Thanks Bob

Bob,

Why link?, just add a calculated field to the report. Will that do the
trick?
(make it invisible if you don't want it printed)

Regards

JK now that is is on my form how do I link that with my Report
(Statement) I have called the text box on my form ClientRef.....Thanks
Bob

BRILLIANT JK just BRILLIANT I added the text box with the source
control
=Left([OwnerLastName],3) & [OwnerID]
Just Brillant thanks for your help....Bob :) :)


Bob,

You can do it in one of the following:

1. Design (or modify the) form to be based on a query that includes
the calculated field
Or
2. In the existing form add a text box and in the Control Source (in
the Properties) to:
=Left([OwnerLastName],3) & [OwnerID]
(The equal sign is mandatory, without it you will get an error)

Regards/JK




Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks
Bob
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing
refCode: with any other expression but always with colon :)) at
the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do
from there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 
B

Bob

Based on a Table, Might have something to do with Last Name, First name,
Title ..thanks bob

Bob said:
Yes JK this is in the header and Owner and Client mean the same thing,
this is the Clients name for his statement, there is an address box below
that..Thanks Bob
JK said:
Bob,

This is incomplete code but I get the idea.

What is your report based on (query/table)?
Is this code in a page header, body or what? (looks like header to me)

From the code it appears that the report is not based on tblOwnerInfo but
only looks at it. This being the case the source code of the code is
slightly different:

=Left(Dlookup("[OwnerLastName]","tblOwnerInfo","[OwnerID]=" &
[OwnerID]),3) & [OwnerID]

Regards


Bob said:
On my Report this is what the Name code looks like
=IIf(DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" & [tbOwnerID])="" Or
IsNull(DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" &
[tbOwnerID])),"",DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" &
[tbOwnerID]) & " ") &

Calculated Field How do I go about that . I want to be able to Print it
on the Report....Thanks Bob

Bob,

Why link?, just add a calculated field to the report. Will that do the
trick?
(make it invisible if you don't want it printed)

Regards

JK now that is is on my form how do I link that with my Report
(Statement) I have called the text box on my form
ClientRef.....Thanks Bob

BRILLIANT JK just BRILLIANT I added the text box with the source
control
=Left([OwnerLastName],3) & [OwnerID]
Just Brillant thanks for your help....Bob :) :)


Bob,

You can do it in one of the following:

1. Design (or modify the) form to be based on a query that includes
the calculated field
Or
2. In the existing form add a text box and in the Control Source
(in the Properties) to:
=Left([OwnerLastName],3) & [OwnerID]
(The equal sign is mandatory, without it you will get an error)

Regards/JK




Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement ..thanks
Bob
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing
refCode: with any other expression but always with colon :)) at
the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do
from there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 
B

Bob

JK, I have both the text box and the Combo Box working on my Client Form
which one should I use!
Which one is easiest to show on my Client statement Report?......Thanks Bob

Bob said:
Based on a Table, Might have something to do with Last Name, First name,
Title ..thanks bob

Bob said:
Yes JK this is in the header and Owner and Client mean the same thing,
this is the Clients name for his statement, there is an address box below
that..Thanks Bob
JK said:
Bob,

This is incomplete code but I get the idea.

What is your report based on (query/table)?
Is this code in a page header, body or what? (looks like header to me)

From the code it appears that the report is not based on tblOwnerInfo
but only looks at it. This being the case the source code of the code is
slightly different:

=Left(Dlookup("[OwnerLastName]","tblOwnerInfo","[OwnerID]=" &
[OwnerID]),3) & [OwnerID]

Regards


On my Report this is what the Name code looks like
=IIf(DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" & [tbOwnerID])=""
Or IsNull(DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" &
[tbOwnerID])),"",DLookUp("OwnerTitle","tblOwnerInfo","OwnerID=" &
[tbOwnerID]) & " ") &

Calculated Field How do I go about that . I want to be able to Print
it on the Report....Thanks Bob

Bob,

Why link?, just add a calculated field to the report. Will that do
the trick?
(make it invisible if you don't want it printed)

Regards

JK now that is is on my form how do I link that with my Report
(Statement) I have called the text box on my form
ClientRef.....Thanks Bob

BRILLIANT JK just BRILLIANT I added the text box with the source
control
=Left([OwnerLastName],3) & [OwnerID]
Just Brillant thanks for your help....Bob :) :)


Bob,

You can do it in one of the following:

1. Design (or modify the) form to be based on a query that
includes the calculated field
Or
2. In the existing form add a text box and in the Control Source
(in the Properties) to:
=Left([OwnerLastName],3) & [OwnerID]
(The equal sign is mandatory, without it you will get an error)

Regards/JK




Brilliant JK worked, so now how do I get each form to show there
individual ref so then I can assign it to there statement
..thanks Bob
I Query design view, in an *empty* column at the top row enter:

refCode: Left([OwnerLastName],3) & [OwnerID]

and run the query

You may rename the column with any other name by replacing
refCode: with any other expression but always with colon :)) at
the end

Regards/JK


JK Ive created a New Query which has the 2 fields what do I do
from there..Thanks Bob
Hi Bob,

Create a calculated field in a query based on your table.

refCode: Left([OwnerLastName],3) & [OwnerID]

Regards/JK
 

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