form/subform key differences capitals

  • Thread starter Thread starter Rohan via AccessMonster.com
  • Start date 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
 
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
 
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
 
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
 
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.
 
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
 
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.
 
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
 
Also - both queries work when you import SRA.SITE instead of using
the linked Oracle table - which doesn't work.

Rohan
 
Back
Top