Selasa, 15 November 2016

Re: [MS_AccessPros] Field in Form being treated a text when it is numeric

 

Hi John
 
OK this what I am trying to do
I have the following tables
Rounds
Cups
Cup Rounds
 
to define appropriate rounds for cups
 
eg rounds might be R1, R2, R3, QF, SF, F
cup1 might have R1, R2, SF and F
cup2 might have R1, R2, R3, QF, SF and F
 
when entering a match record I have 2 fields called Cup and Round
Cup does a lookup on table Cups to get the appropriate Cup
Round does a lookup on Cup Rounds based on the value entered in Cup (using a query)
 
the form does what I expect it to do for the data entry but behaves oddly when I am trying to use it for sorting and filtering as I have previously described
 
I have seen many times how lookups are a bad idea but don't really see why.
 
How would you advise me to code what I am wanting without using lookups?
 
cheers
 
Phil
 
 
 
 


On Tuesday, 15 November 2016, 17:08, "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com> wrote:


 
Phil-

It sounds like you've defined a field with the Lookup data type - that's a really bad idea as evidenced by your confusion.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Nov 15, 2016, at 5:40 PM, Phil Knowles pdk444444@yahoo.co.uk [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



ok that will be fine but even though some records have values for this field they do not appear in the list to select and filter by and if I choose one of the sort options I would expect the records with values to appear at either the top or bottom but they don't appear at all
 
yet if I select the records that I know contain the values in this field (by filtering on another field) I can see the values in the field quite clearly 
 
 


On Tuesday, 15 November 2016, 16:29, "Phil Knowles pdk444444@yahoo.co.uk [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com> wrote:


Hi John
 
It is a new field and I have only  put values in this field for a few records.
 
It is a field though that gets its numeric value via a query and in fact displays the related description for that value rather than the numeric value itself - is that why it is confused?
 
Phil


On Tuesday, 15 November 2016, 15:43, "Phil Knowles pdk444444@yahoo.co.uk [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com> wrote:


 
I am using a form in datasheet mode and one o the fields is numeric.
 
normally if I select the box at the top of a text field it says 
 
sort a to z 
sort z to a
text filters 
then it gives me a list of all the values that are contained in that field with a check box to be able to select and filter
if I do the same for a numeric field it says
 
sort smallest to largest
sort largest to smallest
number filters
then it gives me a similar list to above
 
I have a field that is numeric and contains integers
 
but when I select the box at the top it displays the text version of events and doesn't give me a list of values 
 
any ideas why?









__._,_.___

Posted by: Phil Knowles <pdk444444@yahoo.co.uk>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (8)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar