REPOST: VIEW PICTURE (BMP) from linked combobox

  • Thread starter Thread starter lmv
  • Start date Start date
L

lmv

I am reposting this because it has been several days and no response thnx!

I have a subform that has TID combobox with source TID and
rowsource
SELECT TerritoryNumbers.TID, TerritoryNumbers.DateCheckedIn,
TerritoryNumbers.Icon
FROM TerritoryNumbers
ORDER BY TerritoryNumbers.TID;

when the choice is made, I want the icon field which has a control source of
=[TID].[Column](2) to display on the subform.
My other field works fine
=[TID].[Column](1) (displays a date)
but
=[TID].[Column](2) which is the icon doesn't work.

I have the icon display on the mainform but it is linked to the table rather
than a query and it shows when another unbound cbobox is selected.

Also, is there a way that a picture shows in datasheet view? (Now it just
says pictuer or bitmap image) I have forms that show it fine just wondering.

Any suggestions? Thank You very much!
 
Call the DLookup function in an expression as the ControlSource of a bound
object frame:

=DLookup("Icon"," TerritoryNumbers"," TID = " & Me.TID)

You can remove the Icon column from the combo box's RowSource of course as
the column is no longer being referenced.

You can't display the images in datasheet view, only in form view.

Ken Sheridan
Stafford, England
 
Ken,
I tried it but it didn't work... I deleted the reference from the combo box
as you said and copied it in exactly as you have it. (according to what I
gave you) but nothing is showing.

I also tried changing the "name" on the cbo to cboTID in case there was a
conflict with it being the same as the "source" TID but it still didn't work.
I also tried the following

without the Me
with Me! instead of Me.
with just [TID]

I checked to make sure it was visible
What else am I missing?

Thanks!
Ken Sheridan said:
Call the DLookup function in an expression as the ControlSource of a bound
object frame:

=DLookup("Icon"," TerritoryNumbers"," TID = " & Me.TID)

You can remove the Icon column from the combo box's RowSource of course as
the column is no longer being referenced.

You can't display the images in datasheet view, only in form view.

Ken Sheridan
Stafford, England

lmv said:
I am reposting this because it has been several days and no response thnx!

I have a subform that has TID combobox with source TID and
rowsource
SELECT TerritoryNumbers.TID, TerritoryNumbers.DateCheckedIn,
TerritoryNumbers.Icon
FROM TerritoryNumbers
ORDER BY TerritoryNumbers.TID;

when the choice is made, I want the icon field which has a control source of
=[TID].[Column](2) to display on the subform.
My other field works fine
=[TID].[Column](1) (displays a date)
but
=[TID].[Column](2) which is the icon doesn't work.

I have the icon display on the mainform but it is linked to the table rather
than a query and it shows when another unbound cbobox is selected.

Also, is there a way that a picture shows in datasheet view? (Now it just
says pictuer or bitmap image) I have forms that show it fine just wondering.

Any suggestions? Thank You very much!
 
Strange; I've tried it and it works fine for me, and I can't see that you are
doing anything differently. The Me should be omitted, however, as I'd
forgotten it can only be used in VBA, not in the properties sheet. You can
use Form.ID in the properties sheet however to qualify the reference, but its
not usually necessary unless there might otherwise be some ambiguity.

One thing I'm not clear about is whether your subform is based on another
table in which TID is a foreign key referencing the primary key of
TerritoryNumbers. If that's the case you should be able to base the subform
on a query which joins the two tables on TID and return the DateCheckedIn and
Icon columns in the query. You can then bind controls to them in the subform.

If that's not the scenario perhaps you could explain in more detail just
what the subform does, or at least what you'd like it to do.

Ken Sheridan
Stafford, England

lmv said:
Ken,
I tried it but it didn't work... I deleted the reference from the combo box
as you said and copied it in exactly as you have it. (according to what I
gave you) but nothing is showing.

I also tried changing the "name" on the cbo to cboTID in case there was a
conflict with it being the same as the "source" TID but it still didn't work.
I also tried the following

without the Me
with Me! instead of Me.
with just [TID]

I checked to make sure it was visible
What else am I missing?

Thanks!
Ken Sheridan said:
Call the DLookup function in an expression as the ControlSource of a bound
object frame:

=DLookup("Icon"," TerritoryNumbers"," TID = " & Me.TID)

You can remove the Icon column from the combo box's RowSource of course as
the column is no longer being referenced.

You can't display the images in datasheet view, only in form view.

Ken Sheridan
Stafford, England

lmv said:
I am reposting this because it has been several days and no response thnx!

I have a subform that has TID combobox with source TID and
rowsource
SELECT TerritoryNumbers.TID, TerritoryNumbers.DateCheckedIn,
TerritoryNumbers.Icon
FROM TerritoryNumbers
ORDER BY TerritoryNumbers.TID;

when the choice is made, I want the icon field which has a control source of
=[TID].[Column](2) to display on the subform.
My other field works fine
=[TID].[Column](1) (displays a date)
but
=[TID].[Column](2) which is the icon doesn't work.

I have the icon display on the mainform but it is linked to the table rather
than a query and it shows when another unbound cbobox is selected.

Also, is there a way that a picture shows in datasheet view? (Now it just
says pictuer or bitmap image) I have forms that show it fine just wondering.

Any suggestions? Thank You very much!
 
You gave me an idea so I made an iconlookup form based on a query and imbeded
it into the form.... now it does what I need!

Thanks again!

Ken Sheridan said:
Strange; I've tried it and it works fine for me, and I can't see that you are
doing anything differently. The Me should be omitted, however, as I'd
forgotten it can only be used in VBA, not in the properties sheet. You can
use Form.ID in the properties sheet however to qualify the reference, but its
not usually necessary unless there might otherwise be some ambiguity.

One thing I'm not clear about is whether your subform is based on another
table in which TID is a foreign key referencing the primary key of
TerritoryNumbers. If that's the case you should be able to base the subform
on a query which joins the two tables on TID and return the DateCheckedIn and
Icon columns in the query. You can then bind controls to them in the subform.

If that's not the scenario perhaps you could explain in more detail just
what the subform does, or at least what you'd like it to do.

Ken Sheridan
Stafford, England

lmv said:
Ken,
I tried it but it didn't work... I deleted the reference from the combo box
as you said and copied it in exactly as you have it. (according to what I
gave you) but nothing is showing.

I also tried changing the "name" on the cbo to cboTID in case there was a
conflict with it being the same as the "source" TID but it still didn't work.
I also tried the following

without the Me
with Me! instead of Me.
with just [TID]

I checked to make sure it was visible
What else am I missing?

Thanks!
Ken Sheridan said:
Call the DLookup function in an expression as the ControlSource of a bound
object frame:

=DLookup("Icon"," TerritoryNumbers"," TID = " & Me.TID)

You can remove the Icon column from the combo box's RowSource of course as
the column is no longer being referenced.

You can't display the images in datasheet view, only in form view.

Ken Sheridan
Stafford, England

:

I am reposting this because it has been several days and no response thnx!

I have a subform that has TID combobox with source TID and
rowsource
SELECT TerritoryNumbers.TID, TerritoryNumbers.DateCheckedIn,
TerritoryNumbers.Icon
FROM TerritoryNumbers
ORDER BY TerritoryNumbers.TID;

when the choice is made, I want the icon field which has a control source of
=[TID].[Column](2) to display on the subform.
My other field works fine
=[TID].[Column](1) (displays a date)
but
=[TID].[Column](2) which is the icon doesn't work.

I have the icon display on the mainform but it is linked to the table rather
than a query and it shows when another unbound cbobox is selected.

Also, is there a way that a picture shows in datasheet view? (Now it just
says pictuer or bitmap image) I have forms that show it fine just wondering.

Any suggestions? Thank You very much!
 

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

Back
Top