Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 46
  1. #31
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    62
    no it doesnt let you do that i just lets you choose where you get you combo box info ive attached a copy of the db to show what i mean

  2. #32
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Start by removing your Lookup Fields: http://www.mvps.org/access/lookupfields.htm
    ...and here's how: http://www.btabdevelopment.com/ts/removelookups

  3. #33
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    62
    but do i not need the look ups to get the vehicle regs in the first place from another table vehicles?

  4. #34
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Having the Lookup's (ComboBoxes) on your form is just fine and exactly what you want. Just not at the table level!

  5. #35
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    62
    Arh ok that makes sense ive now changed that, so is that a general rule not to use cbo at table level or only when then trying to run a macro or code used with it.

  6. #36
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Did you read the link I posted? Developers *never* use them, period!

  7. #37
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    A few other rules of thumb:
    1) Unless you will be doing math with the field a number should be a String field (like the Tech_ID field)
    2) Normalization rules require your PrimaryKeys be stored as ForeignKeys when you need to create the relationship. The TEXT description should *only* be located on one table. Vehicle_Lease_Company field in the Vehicle table s/b the LeasingID PrimaryKey in the Vehicle_Leasing table, not the name.

  8. #38
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    62
    yes i did, and i think i now understand why, so at table level there should be no reason you use one as you wouldnt really add data at that level anyway so it will not get in the way of anything later in the design, and any information would come from your forms where the cbo are ok to use. i think iim getting it a little now.

  9. #39
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    When Lookup Fields are used it is very difficult to see what value is actually in the table and generally that confuses the programmer. I know it does me.

  10. #40
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    62
    Ive now gone back through my tables as i used cbo's all over the place so now i think i have a better basis to create my db only now using cbo's in my forms

  11. #41
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Good. How about posting your db again so we can stay in sync?

  12. #42
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    62
    Please find attached

  13. #43
    bopsgtir is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    62
    this is the sort of line im trying

    SearchForRecord
    Object Type Table
    Object Name Tech_Vehicle
    First
    Condition
    [Forms]![Tech_Vehicle]![Vehicle_Reg]=[Tech_Vehicle]![Vehicle_Reg]&[Tech_Vehicle]![Date_Returned] IsNull(

    im trying to say search for first record where the form vehicle reg = a reg on the tech table with no date_returned which would be is null, but when i put the isnull it gives me a ( and asks for an expression i thought the isnull would of been the end of it. ??????? confused

  14. #44
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Some more useful rules for maintaining a db in Access.
    1) Whenever possible use an AutoNumber as the PrimakyKey (PK) of a table.
    2) Give that PK a useful name representative of the table it is in, not just ID.
    3) When you use that PK as a ForeignKey (FK) in another table then name the fields the same. It is a lot easier to understand years later.

  15. #45
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    More suggestions:
    1) Cascading Updates and Deletes are way too powerful for me. I prefer to do that work myself. Just a suggestion.
    2) Once a good FK is in a table, any related field from either table can be displayed and modified as if it were in one table using a query. *Very* powerful concept!

Page 3 of 4 FirstFirst 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Hello! Help required if possible please...
    By MarkGLyons in forum Access
    Replies: 21
    Last Post: 12-28-2010, 05:36 AM
  2. immediate help required
    By pdurgi in forum Access
    Replies: 1
    Last Post: 06-05-2009, 08:21 PM
  3. help required badly
    By pradeep_siemens in forum Programming
    Replies: 0
    Last Post: 05-28-2009, 04:41 AM
  4. Object required
    By duckie10 in forum Access
    Replies: 1
    Last Post: 05-15-2009, 02:11 PM
  5. Replies: 0
    Last Post: 02-15-2007, 03:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums