S
StargateFan
I noticed earlier this morning in my main form that sorting not
correct and that the Me.OrderBy wasn't enough. Many posts I've
recently found in archives have now taught me that I should always
rely on a query rather than Me.OrderBy. Fair enough. Changed
recordsource to a query on the main table. Sorting now fine. But
I've run into a snag which seems to point to my having done something
wrong with the "lookup table" values of one field.
In my main form, the province shows up as two characters. The lookup
table values have an A2K primary key index #, the field for the two
character version of the province and then one for the full name. So,
for example, one of the entries in the "Provinces and Abbreviations"
table which is used in a query later is:
9 ON Ontario
The difficulty that I've just found is that in this main form, I see
the ON value for any records in Ontario and everything seems to work
fine there. When user is in field, s/he sees only the text values:
ON Ontario
and if this were chosen, only ON shows up in form. Okay so far.
Well, the query gave me trouble as an error box came up saying value
was invalid for some of the provinces. I didn't know what to do so
just re-selected the provinces from there. **One funny thing that
might point to answer is that in the query, the only thing user sees
is ON, and all other two-character abbreviations but no full names
(?).
When I just went back to the main form, the sort order now perfect but
in the fields where I'd added/changed the province while in the query,
I get a "9" instead of "ON", for example. I wanted to see what
happened next so I changed the "9" back to "ON" in the form and then
when I went back to query saw that the province field now shows up
blank! What on earth have I done now, pls? <g>
Thanks for any help. D
correct and that the Me.OrderBy wasn't enough. Many posts I've
recently found in archives have now taught me that I should always
rely on a query rather than Me.OrderBy. Fair enough. Changed
recordsource to a query on the main table. Sorting now fine. But
I've run into a snag which seems to point to my having done something
wrong with the "lookup table" values of one field.
In my main form, the province shows up as two characters. The lookup
table values have an A2K primary key index #, the field for the two
character version of the province and then one for the full name. So,
for example, one of the entries in the "Provinces and Abbreviations"
table which is used in a query later is:
9 ON Ontario
The difficulty that I've just found is that in this main form, I see
the ON value for any records in Ontario and everything seems to work
fine there. When user is in field, s/he sees only the text values:
ON Ontario
and if this were chosen, only ON shows up in form. Okay so far.
Well, the query gave me trouble as an error box came up saying value
was invalid for some of the provinces. I didn't know what to do so
just re-selected the provinces from there. **One funny thing that
might point to answer is that in the query, the only thing user sees
is ON, and all other two-character abbreviations but no full names
(?).
When I just went back to the main form, the sort order now perfect but
in the fields where I'd added/changed the province while in the query,
I get a "9" instead of "ON", for example. I wanted to see what
happened next so I changed the "9" back to "ON" in the form and then
when I went back to query saw that the province field now shows up
blank! What on earth have I done now, pls? <g>
Thanks for any help. D