1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access: Form with subform datasheet. Selecting record on datasheet shows in form.

Discussion in 'Business Applications' started by firestormer, Jul 9, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. firestormer

    firestormer Thread Starter

    Joined:
    Sep 16, 2005
    Messages:
    1,254
    I want to create a form in a sort inbox style so i ahve a list of records at the top in a datasheet and then by clicking on the list the details should show up in colunmar view below.

    Sound simple its not.

    I can get it to work the other way round by having a datasheet subform in my main form but thats not much use.

    What i need to do is to somehow reverse how the form subform relationship works.

    Any ideas?
     
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    The problem is that with a datasheet view Access doesn't know which record you are in, if you change it to a "Continuous form" with record selectors as "yes" it will know which record is chosen.
    Can you post a zipped copy of the database on here?
     
  3. firestormer

    firestormer Thread Starter

    Joined:
    Sep 16, 2005
    Messages:
    1,254
    Ok here we are. see attatched

    The offending forms are

    FrmFaultReportInbox
    FrmFaultReportInbox subform

    with table

    TblFaultReport

    Is a bit messy and you can ignore all the other tables for this.

    What im trying to create is a fault report system to allow people to report faults with computers and devices over a LAN
     

    Attached Files:

  4. firestormer

    firestormer Thread Starter

    Joined:
    Sep 16, 2005
    Messages:
    1,254
    Ive been looking at a way of having the souce for the main form as query which takes results out the subformbut ive havnt had much success yet
     
  5. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    firestormer, what are you trying to do with the subform?
    Are you trying to select a record and have the main form go to it?
     
  6. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Something like this?
     

    Attached Files:

  7. firestormer

    firestormer Thread Starter

    Joined:
    Sep 16, 2005
    Messages:
    1,254
    I want it so that the records are liste in the subform and by secting a record in the subform it will show up in the main form.
     
  8. firestormer

    firestormer Thread Starter

    Joined:
    Sep 16, 2005
    Messages:
    1,254
    Thats an intresting way of doing it ill go back t othat if all fails.
    Is it possible to have that but with the list always expanded?
     
  9. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    You can use a List box instead of a combo box to do the same kind of thing, now that I know what it is that you want to do I will see if I can make your original version do what you want.
    You are in actual fact doing it back to front, you normally select a record on the Main form and have the Sub form show the Data.:)
     
  10. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Sorry, I can't get it to do it from the subform because the Main Form loads up first.
    But I have changed the Combo Box to a List Box and it now looks more like your original.
    Try this one.
     

    Attached Files:

  11. firestormer

    firestormer Thread Starter

    Joined:
    Sep 16, 2005
    Messages:
    1,254
    Wow wer relly on the same wavelength. i just changed it to a list box before looking at ur last 2 posts and it works perfectly!

    I copied ur VB code and altered it a bit. im slowly learning more VB.
    Now all i need to do is set it to update the listbox when changes are made which should be easy (fingers crossed)

    Thanks loads
     
  12. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/481691

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice