form/subform key differences capitals

  • Thread starter Rohan via AccessMonster.com
  • Start date
R

Rohan via AccessMonster.com

I have a form with a site_code. On the form is a subform, which also has a
site_code.

The two forms are linked via this site_code.

Lets say the master site_code is AMM. Then I create a record in the subform.

The subform's site_code is amm (lowercase).

Sometimes this happens, sometimes it doesn't (the change in capitalisation).

Any clues ?

Rohan
 
T

tina

in either table, are you sure the site_code is being *saved* as capital
letters, or is the field merely being *displayed* as capital letters? if
you're using the Format property of the field in the table, or of the
control in the form, to display "all caps", then keep in mind that
Formatting affects the *display* of data only; it has no effect on how the
data is stored.

hth
 
R

Rohan via AccessMonster.com

tina said:
in either table, are you sure the site_code is being *saved* as capital
letters, or is the field merely being *displayed* as capital letters? if
you're using the Format property of the field in the table, or of the
control in the form, to display "all caps", then keep in mind that
Formatting affects the *display* of data only; it has no effect on how the
data is stored.

The main form's table is definately in capitals, the subform's in lowercase.

Cheers,

Rohan
 
T

tina

well, then you need to look for any code, or an input mask, that's forcing
lowercase in the subform, since the primary key is copied *from* the parent
table *to* the child table in a properly linked mainform/subform setup.

hth
 
R

Rohan via AccessMonster.com

tina said:
well, then you need to look for any code, or an input mask, that's forcing
lowercase in the subform, since the primary key is copied *from* the parent
table *to* the child table in a properly linked mainform/subform setup.

Just created a new database with a subset of the forms/queries, and
duplicated
the results. Searched through it for anything that makes a lower case
site_code
and can't find anything.

The reason I'm asking is because one of my queries has both the SITE_CODE
and the site_code (master form and subform) in it, and has them linked by a
relationship. When the two differ, the records are not shown in the results.

Rohan.
 
T

tina

Access is not case-sensitive. if you query for "AMM", the query will return
records with those three letters in the field, regardless of case.

hth
 
R

Rohan via AccessMonster.com

tina said:
Access is not case-sensitive. if you query for "AMM", the query will return
records with those three letters in the field, regardless of case.

Even stranger is that it only doesn't show on one particular machine.

Anyhow - thanks for all your help Tina.

Cheers,

Rohan.
 
R

Rohan via AccessMonster.com

Here is the query that doesn't work:

SELECT commodity1.commodity, ExplorationCommodity.commodityID,
ExplorationCommodity.site_code
FROM SRA_SITE INNER JOIN (commodity1 INNER JOIN ExplorationCommodity ON
commodity1.commodityID = ExplorationCommodity.commodityID) ON SRA_SITE.
SITE_CODE = ExplorationCommodity.site_code
ORDER BY commodity1.commodity;

Here is the query that does work:

SELECT commodity1.commodity, ExplorationCommodity.commodityID,
ExplorationCommodity.site_code
FROM commodity1 INNER JOIN ExplorationCommodity ON commodity1.commodityID =
ExplorationCommodity.commodityID
ORDER BY commodity1.commodity;

There is an entry in SRA_SITE.SITE_CODE called "AMM"
and and entry in ExplorationCommodity.site_code called "amm"

It doesn't find the record in query 1, but does in query 2.

Rohan
 
R

Rohan via AccessMonster.com

Also - both queries work when you import SRA.SITE instead of using
the linked Oracle table - which doesn't work.

Rohan
 
Top