Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Designing a subdata sheet Table View

Discussion in 'Information Technology' started by Wendy F, Jul 28, 2006.

  1. Wendy F

    Wendy F
    Expand Collapse
    Guest

    Does anyone know how to hide Collumn and Row selectors from showing in a
    subdata sheet on a form so that you only see the list not collumn header or
    row selector. I intend for this to be on a switchboard for a list of Reports
    that can be opened via a command button underneath the subdata sheet.
     
  2. Loading...

    Similar Threads Forum Date
    Macromedia Flash animation and designing. Interfaith Dialogues Oct 21, 2004

  3. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Wendy,

    You could use the subform in Continuous view.

    Your intended usage, though, sounds like something that is more often
    done with a listbox.

    --
    Steve Schapel, Microsoft Access MVP


    Wendy F wrote:
    > Does anyone know how to hide Collumn and Row selectors from showing in a
    > subdata sheet on a form so that you only see the list not collumn header or
    > row selector. I intend for this to be on a switchboard for a list of Reports
    > that can be opened via a command button underneath the subdata sheet.
     
  4. Wendy F

    Wendy F
    Expand Collapse
    Guest

    If I used a list box to show the reports how will the command button
    underneath the list work in opening each of highlighted reports. When I have
    tried it, it only seems to want to open one report. How can you set the
    macro so that it can open any of e reports that you highlight in the list.
    There's no problem with the edit list button as that will take you to the
    list. But when it comes to opening 1 report from the list it's proving to be
    a problem. The macro will only let you set up 1 report from the list. I
    want to be able to open any of them at the click of the button. (Sorry I
    meant to say preview the report/s). I would appreciate you help on this as I
    am still a learner when it comes to using visual basic or Building functions
    etc. I have no problem with straight forward macro's just the more
    complicated one's which may involve group macro's.

    Wendy

    "Steve Schapel" wrote:

    > Wendy,
    >
    > You could use the subform in Continuous view.
    >
    > Your intended usage, though, sounds like something that is more often
    > done with a listbox.
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    >
    > Wendy F wrote:
    > > Does anyone know how to hide Collumn and Row selectors from showing in a
    > > subdata sheet on a form so that you only see the list not collumn header or
    > > row selector. I intend for this to be on a switchboard for a list of Reports
    > > that can be opened via a command button underneath the subdata sheet.

    >
     
  5. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Wendy,

    Well, you could use my first suggestion of a continuous view form.

    If you use a multi-select listbox, it will be very difficult to manage
    this with a macro. You will need to use VBA code to loop through each
    ItemData in the listbox's ItemsSelected collection.

    But if you were using a datasheet, or a continuous view form for that
    matter, how were you proposing to go about selecting and processing more
    than one report anyway?

    --
    Steve Schapel, Microsoft Access MVP

    Wendy F wrote:
    > If I used a list box to show the reports how will the command button
    > underneath the list work in opening each of highlighted reports. When I have
    > tried it, it only seems to want to open one report. How can you set the
    > macro so that it can open any of e reports that you highlight in the list.
    > There's no problem with the edit list button as that will take you to the
    > list. But when it comes to opening 1 report from the list it's proving to be
    > a problem. The macro will only let you set up 1 report from the list. I
    > want to be able to open any of them at the click of the button. (Sorry I
    > meant to say preview the report/s). I would appreciate you help on this as I
    > am still a learner when it comes to using visual basic or Building functions
    > etc. I have no problem with straight forward macro's just the more
    > complicated one's which may involve group macro's.
     
  6. Wendy F

    Wendy F
    Expand Collapse
    Guest

    Steve

    Never got that far so I probably would have ended up in the same position as
    now. How do you use VBA code to loop through each itemdata in listbox's
    itemSelected collection, as you surgested as I said I am not really up on
    using Visual Basic if that's what VBA is so how would I write this out in
    what form. I would appreciate your help as I really need to only have 1
    button to press to open the report/s when selected. Or am I going to have to
    have a button for each separate report. I am just trying to make it easier
    for the users to open preset reports for the information that they need. The
    information needed is unlikely to change for a long while.

    "Steve Schapel" wrote:

    > Wendy,
    >
    > Well, you could use my first suggestion of a continuous view form.
    >
    > If you use a multi-select listbox, it will be very difficult to manage
    > this with a macro. You will need to use VBA code to loop through each
    > ItemData in the listbox's ItemsSelected collection.
    >
    > But if you were using a datasheet, or a continuous view form for that
    > matter, how were you proposing to go about selecting and processing more
    > than one report anyway?
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    > Wendy F wrote:
    > > If I used a list box to show the reports how will the command button
    > > underneath the list work in opening each of highlighted reports. When I have
    > > tried it, it only seems to want to open one report. How can you set the
    > > macro so that it can open any of e reports that you highlight in the list.
    > > There's no problem with the edit list button as that will take you to the
    > > list. But when it comes to opening 1 report from the list it's proving to be
    > > a problem. The macro will only let you set up 1 report from the list. I
    > > want to be able to open any of them at the click of the button. (Sorry I
    > > meant to say preview the report/s). I would appreciate you help on this as I
    > > am still a learner when it comes to using visual basic or Building functions
    > > etc. I have no problem with straight forward macro's just the more
    > > complicated one's which may involve group macro's.

    >
     
  7. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Wendy,

    Just to clarify, do you mean that the Listbox, or the Form, would be a
    list of the names of the reports?

    --
    Steve Schapel, Microsoft Access MVP

    Wendy F wrote:
    > Steve
    >
    > Never got that far so I probably would have ended up in the same position as
    > now. How do you use VBA code to loop through each itemdata in listbox's
    > itemSelected collection, as you surgested as I said I am not really up on
    > using Visual Basic if that's what VBA is so how would I write this out in
    > what form. I would appreciate your help as I really need to only have 1
    > button to press to open the report/s when selected. Or am I going to have to
    > have a button for each separate report. I am just trying to make it easier
    > for the users to open preset reports for the information that they need. The
    > information needed is unlikely to change for a long while.
    >
     
  8. Wendy F

    Wendy F
    Expand Collapse
    Guest

    Steve

    The Form will have on it a list box from a table listing with say 5 reports
    (the table listing is the names of the reports from the reports folder with a
    autonumbered key).
    What I want to do is be able to click on one of the reports from the list
    and then click the command button underneath the listing which will open the
    report to preview if not preview it, to print it. There will also be another
    command button which will enable me to edit the report listing so that I can
    if necessary delete a report as it's no longer needed or add a report to the
    listing from the reports folder. I don't have a problem with the edit report
    command button as that works and takes me to the table listing so that I can
    add or delete.
    It's being able to open one of the chosen reports from the listing that is
    the problem. I can set up one report to view, and that's fine if I don't
    need to have a choice from the list, but I would like the person using it to
    be able to choose from the list and be able to preview or print the report
    they choose from that list.

    Hope this explains what I need. I am sure it can be done. As I have seen
    something similar in a Access template database called Class Room Management
    Database. I had a look at it but was unable to figure it out. it used a
    group macro call reports macro, but when you ran the macro, it gave me a
    message about there being no report of that name. But then when you clicked
    on the button on the form in user view it worked and opened up the report for
    previewing. So I have not been able to figure it out. Probably because as I
    said I am not that good with Visual basic. If you would like me to e-mail
    you the template database so you can see what I mean you will have to supply
    me with you e-mail address.

    Wendy F

    Wendy

    "Steve Schapel" wrote:

    > Wendy,
    >
    > Just to clarify, do you mean that the Listbox, or the Form, would be a
    > list of the names of the reports?
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    > Wendy F wrote:
    > > Steve
    > >
    > > Never got that far so I probably would have ended up in the same position as
    > > now. How do you use VBA code to loop through each itemdata in listbox's
    > > itemSelected collection, as you surgested as I said I am not really up on
    > > using Visual Basic if that's what VBA is so how would I write this out in
    > > what form. I would appreciate your help as I really need to only have 1
    > > button to press to open the report/s when selected. Or am I going to have to
    > > have a button for each separate report. I am just trying to make it easier
    > > for the users to open preset reports for the information that they need. The
    > > information needed is unlikely to change for a long while.
    > >

    >
     
  9. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Wendy,

    There area few questions here.

    If the report preview opens via the button on the form, but not when you
    run the macro directly, well, even when you run the macro directly the
    form has to be open, there has to be an item selected in the listbox,
    and probably the form itself needs to be the active object. So I
    wouldn't worry about this - in normal usage you won't be directly
    activating the macro anyway, no?

    It is certainly possible to have more than one report previewed at a
    time. However, I have never done this, and would tend to avoid this
    approach. I am still not clear whether you want to select one report
    from the list, and then preview/print it, or whether you want to process
    more than one report simultneously. These are two different scenarios.
    If you want to do multiple reports, based on selections in a
    multi-select format listbox, then I don't know of a way to do this with
    a macro. As far as I know, it would require VBA code instead. So, can
    you post back with details of the macro you are trying so far?

    --
    Steve Schapel, Microsoft Access MVP

    Wendy F wrote:
    > Steve
    >
    > The Form will have on it a list box from a table listing with say 5 reports
    > (the table listing is the names of the reports from the reports folder with a
    > autonumbered key).
    > What I want to do is be able to click on one of the reports from the list
    > and then click the command button underneath the listing which will open the
    > report to preview if not preview it, to print it. There will also be another
    > command button which will enable me to edit the report listing so that I can
    > if necessary delete a report as it's no longer needed or add a report to the
    > listing from the reports folder. I don't have a problem with the edit report
    > command button as that works and takes me to the table listing so that I can
    > add or delete.
    > It's being able to open one of the chosen reports from the listing that is
    > the problem. I can set up one report to view, and that's fine if I don't
    > need to have a choice from the list, but I would like the person using it to
    > be able to choose from the list and be able to preview or print the report
    > they choose from that list.
    >
    > Hope this explains what I need. I am sure it can be done. As I have seen
    > something similar in a Access template database called Class Room Management
    > Database. I had a look at it but was unable to figure it out. it used a
    > group macro call reports macro, but when you ran the macro, it gave me a
    > message about there being no report of that name. But then when you clicked
    > on the button on the form in user view it worked and opened up the report for
    > previewing. So I have not been able to figure it out. Probably because as I
    > said I am not that good with Visual basic. If you would like me to e-mail
    > you the template database so you can see what I mean you will have to supply
    > me with you e-mail address.
    >
    >
     
  10. Wendy

    Wendy
    Expand Collapse
    Guest

    Hi Steve

    I think you have missunderstood what I said. The list box is a subdata
    sheet on the form (table) and each report in the table is a record of a
    report that exists in the reports folder. I first made made the table
    consisting of an autonumbering key, Data text, consisting the name of the
    report and a 3 collumn consisting of a description of the report. Once the
    table was created I then went to the form and used the create list box from
    table wizard.

    As for the report I don't want to print multi reports at once I just want to
    be able to choose a report from the list by highlighting and then click on
    the command button below to preview or print the report depending on how what
    I the command button has been set up to do which could be either print or
    preview, that decision has not been reached yet. All I need to know is how I
    can do this.

    As I said you will understand what I want to do if you had a look at the
    classroom Management data base which show how this type of function works.
    Its just I am not able to figure it out from the template. As I said I can
    e-mail you the template so you can have a look.


    "Steve Schapel" wrote:

    > Wendy,
    >
    > There area few questions here.
    >
    > If the report preview opens via the button on the form, but not when you
    > run the macro directly, well, even when you run the macro directly the
    > form has to be open, there has to be an item selected in the listbox,
    > and probably the form itself needs to be the active object. So I
    > wouldn't worry about this - in normal usage you won't be directly
    > activating the macro anyway, no?
    >
    > It is certainly possible to have more than one report previewed at a
    > time. However, I have never done this, and would tend to avoid this
    > approach. I am still not clear whether you want to select one report
    > from the list, and then preview/print it, or whether you want to process
    > more than one report simultneously. These are two different scenarios.
    > If you want to do multiple reports, based on selections in a
    > multi-select format listbox, then I don't know of a way to do this with
    > a macro. As far as I know, it would require VBA code instead. So, can
    > you post back with details of the macro you are trying so far?
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    > Wendy F wrote:
    > > Steve
    > >
    > > The Form will have on it a list box from a table listing with say 5 reports
    > > (the table listing is the names of the reports from the reports folder with a
    > > autonumbered key).
    > > What I want to do is be able to click on one of the reports from the list
    > > and then click the command button underneath the listing which will open the
    > > report to preview if not preview it, to print it. There will also be another
    > > command button which will enable me to edit the report listing so that I can
    > > if necessary delete a report as it's no longer needed or add a report to the
    > > listing from the reports folder. I don't have a problem with the edit report
    > > command button as that works and takes me to the table listing so that I can
    > > add or delete.
    > > It's being able to open one of the chosen reports from the listing that is
    > > the problem. I can set up one report to view, and that's fine if I don't
    > > need to have a choice from the list, but I would like the person using it to
    > > be able to choose from the list and be able to preview or print the report
    > > they choose from that list.
    > >
    > > Hope this explains what I need. I am sure it can be done. As I have seen
    > > something similar in a Access template database called Class Room Management
    > > Database. I had a look at it but was unable to figure it out. it used a
    > > group macro call reports macro, but when you ran the macro, it gave me a
    > > message about there being no report of that name. But then when you clicked
    > > on the button on the form in user view it worked and opened up the report for
    > > previewing. So I have not been able to figure it out. Probably because as I
    > > said I am not that good with Visual basic. If you would like me to e-mail
    > > you the template database so you can see what I mean you will have to supply
    > > me with you e-mail address.
    > >
    > >

    >
     
  11. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Wendy,

    Thank you for the further information.

    So, this is what you want?...

    On the form is a listbox which shows the names of your reports.
    On the form also is a command button.
    The user will select the name of a report in the listbox, and then click
    the button, and the selected report will be printed.

    Am I right?

    As far as I know, you can't put a listbox on a subdatasheet, so I am not
    sure what you mean about this.

    But otherwise, to do what you want is very easy.

    First of all, remove the Autonumber field from the reports table, this
    is confusing and unnecessary.

    Put your listbox and command button on the form.

    Make sure the listbox is set up so the [Data text] is the first column,
    and the listbox's Bound Column property is set to 1.

    Make a macro like this...
    Action: OpenReport
    ReportName: =[NameOfListbox]
    View: Print (or Print Preview, depending when you make up your mind)

    Close, name, and save this macro.
    Assign the macro on the On Click event property of the command button

    Of course, you will substitute the actual name of your listbox for the
    "[NameOfListbox]" I mentioned in the example above.

    Please post back if you need further help.

    --
    Steve Schapel, Microsoft Access MVP


    Wendy wrote:
    > Hi Steve
    >
    > I think you have missunderstood what I said. The list box is a subdata
    > sheet on the form (table) and each report in the table is a record of a
    > report that exists in the reports folder. I first made made the table
    > consisting of an autonumbering key, Data text, consisting the name of the
    > report and a 3 collumn consisting of a description of the report. Once the
    > table was created I then went to the form and used the create list box from
    > table wizard.
    >
    > As for the report I don't want to print multi reports at once I just want to
    > be able to choose a report from the list by highlighting and then click on
    > the command button below to preview or print the report depending on how what
    > I the command button has been set up to do which could be either print or
    > preview, that decision has not been reached yet. All I need to know is how I
    > can do this.
     
  12. Wendy F

    Wendy F
    Expand Collapse
    Guest

    Hi Steve

    The List box has been put directly onto the form, sorry I don't know why I
    said on a subdata sheet, but I am still having problems, I tried your
    surgestion but it did not work. It said it could not find the report named
    Report listing which is what I called my listbox with my reports listed in
    it. I tried several times following your instruction carefully each time
    still no joy. I got the message switch form out of string space what ever
    that means. So I decided to go back to the example that does work in the
    template Classroom Management database and see if I could figure out how that
    one worked. I followed everything that was set up in that database and did
    the same just substituting my listing and named reports etc instead but
    basically using everything else the same the following is how it is set up.

    the list box was made from a table/query with the row source as 'Add or
    Delete Reports' which is what the query was saved as. It had a default value
    set up so I did the same from my lists of reports.
    A group macro named View Reports Macros was made up of the following macro
    names and actions:

    Name Action Report Name:
    cmdOpenReport : On Click OpenReport =[Forms]![View
    Reports]![lst Reports] (view: print preview, window mode: Normal)

    EditReportList : On Click OpenForm Reports
    (View: Datasheet, Data mode: Edit, Window mode: Normal)

    lstReports : On Click OpenReport =[Forms]![View
    Reports]![lst Reports] (View: print preview, Window mode: Normal)

    the command button for previewing the report chosen was named cmdOpenReport
    with the caption &Open Report
    the command button for editing the listing was named EditReportList with the
    caption as &Edit Report List....
    the listbox was named lstReport

    In the on click section of the command button field options was typed:
    View Report Macros.cmdOpenReport : On Click
    In the list box field option for on Dbl Click was typed:
    View Reports Macros.lstReport : On Click
    In the on Click field options for th command button of the edit report was
    typed:
    View Reports Macros.EditReportList : On Click

    As I said other than subsituting my set for the other it should have worked
    but it did'ent I got the message Switch Board Form A problem occurred white
    switchboard form was communicating with the OLE Server or ActiveX control
    Close the OLE server & restart it outside of switch board form then try the
    original operation again in switch board form. each time a tried to execute
    the command. What it wrong with it, it should work but it dos'ent. I am
    ready to give up on this. Please help.

    Wendy

    "Steve Schapel" wrote:

    > Wendy,
    >
    > Thank you for the further information.
    >
    > So, this is what you want?...
    >
    > On the form is a listbox which shows the names of your reports.
    > On the form also is a command button.
    > The user will select the name of a report in the listbox, and then click
    > the button, and the selected report will be printed.
    >
    > Am I right?
    >
    > As far as I know, you can't put a listbox on a subdatasheet, so I am not
    > sure what you mean about this.
    >
    > But otherwise, to do what you want is very easy.
    >
    > First of all, remove the Autonumber field from the reports table, this
    > is confusing and unnecessary.
    >
    > Put your listbox and command button on the form.
    >
    > Make sure the listbox is set up so the [Data text] is the first column,
    > and the listbox's Bound Column property is set to 1.
    >
    > Make a macro like this...
    > Action: OpenReport
    > ReportName: =[NameOfListbox]
    > View: Print (or Print Preview, depending when you make up your mind)
    >
    > Close, name, and save this macro.
    > Assign the macro on the On Click event property of the command button
    >
    > Of course, you will substitute the actual name of your listbox for the
    > "[NameOfListbox]" I mentioned in the example above.
    >
    > Please post back if you need further help.
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    >
    > Wendy wrote:
    > > Hi Steve
    > >
    > > I think you have missunderstood what I said. The list box is a subdata
    > > sheet on the form (table) and each report in the table is a record of a
    > > report that exists in the reports folder. I first made made the table
    > > consisting of an autonumbering key, Data text, consisting the name of the
    > > report and a 3 collumn consisting of a description of the report. Once the
    > > table was created I then went to the form and used the create list box from
    > > table wizard.
    > >
    > > As for the report I don't want to print multi reports at once I just want to
    > > be able to choose a report from the list by highlighting and then click on
    > > the command button below to preview or print the report depending on how what
    > > I the command button has been set up to do which could be either print or
    > > preview, that decision has not been reached yet. All I need to know is how I
    > > can do this.

    >
     
  13. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Wendy,

    I am sorry, I can't give a definitive answer here. But it is sure to be
    some little details somewhere not right.

    I am not saying this is the problem... I don't know what the effect
    would be. But I would not use a : as part of the name of a macro (or
    any other database object for that matter).

    Also, I would not use the Dbl Click event of a listbox. Is that what
    they did in the database template you were basing your work on?

    The other thing I noticed is the inconsistency in the naming in the
    information you gave here. For example, you said in your descripion
    that the listbox is named "Report listing", whereas in the macro details
    you show it as "lst Reports", yet further down you say it is named
    "lstReport". 3 completely different names for the same thing. You are
    probalbly just being careless in your posting here, but accuracy with
    these types of details are critical, so it makes me wonder whether the
    problem lies with a spelling mistake somwhere along the line.

    --
    Steve Schapel, Microsoft Access MVP


    Wendy F wrote:
    > Hi Steve
    >
    > The List box has been put directly onto the form, sorry I don't know why I
    > said on a subdata sheet, but I am still having problems, I tried your
    > surgestion but it did not work. It said it could not find the report named
    > Report listing which is what I called my listbox with my reports listed in
    > it. I tried several times following your instruction carefully each time
    > still no joy. I got the message switch form out of string space what ever
    > that means. So I decided to go back to the example that does work in the
    > template Classroom Management database and see if I could figure out how that
    > one worked. I followed everything that was set up in that database and did
    > the same just substituting my listing and named reports etc instead but
    > basically using everything else the same the following is how it is set up.
    >
    > the list box was made from a table/query with the row source as 'Add or
    > Delete Reports' which is what the query was saved as. It had a default value
    > set up so I did the same from my lists of reports.
    > A group macro named View Reports Macros was made up of the following macro
    > names and actions:
    >
    > Name Action Report Name:
    > cmdOpenReport : On Click OpenReport =[Forms]![View
    > Reports]![lst Reports] (view: print preview, window mode: Normal)
    >
    > EditReportList : On Click OpenForm Reports
    > (View: Datasheet, Data mode: Edit, Window mode: Normal)
    >
    > lstReports : On Click OpenReport =[Forms]![View
    > Reports]![lst Reports] (View: print preview, Window mode: Normal)
    >
    > the command button for previewing the report chosen was named cmdOpenReport
    > with the caption &Open Report
    > the command button for editing the listing was named EditReportList with the
    > caption as &Edit Report List....
    > the listbox was named lstReport
    >
    > In the on click section of the command button field options was typed:
    > View Report Macros.cmdOpenReport : On Click
    > In the list box field option for on Dbl Click was typed:
    > View Reports Macros.lstReport : On Click
    > In the on Click field options for th command button of the edit report was
    > typed:
    > View Reports Macros.EditReportList : On Click
    >
    > As I said other than subsituting my set for the other it should have worked
    > but it did'ent I got the message Switch Board Form A problem occurred white
    > switchboard form was communicating with the OLE Server or ActiveX control
    > Close the OLE server & restart it outside of switch board form then try the
    > original operation again in switch board form. each time a tried to execute
    > the command. What it wrong with it, it should work but it dos'ent. I am
    > ready to give up on this. Please help.
    >
     
  14. Wendy F

    Wendy F
    Expand Collapse
    Guest

    Hi Steve

    Sorry for mix up I meant the form was named Report Listing and the listbox
    was named lstReport (lstReport is started with a lowercase L) but maybe that
    it where I should be checking maybe I have inadmittedly done that I and
    called the listbox ReportListing will have to check it out and let you know I
    will also check spellings to make sure that its all correct. As for using :
    in the name section of the Macro that is because the one from the Class Room
    Management database was set up like that and as it worked on theirs I wanted
    to keep it the same as I did not know whether it would make a difference. On
    theirs for the macro to work the form had to be open and a report highlighted
    other wise if you tried to run the macro without the form being open you
    would get the message switchboard form is either closed or removed please
    open and run the macro again.

    I have just thought of something which I will have to try!
    again I will let you know later. I am at work at the moment and the
    database is still under construction at home so I cannot check it out.

    Wendy

    "Steve Schapel" wrote:

    > Wendy,
    >
    > I am sorry, I can't give a definitive answer here. But it is sure to be
    > some little details somewhere not right.
    >
    > I am not saying this is the problem... I don't know what the effect
    > would be. But I would not use a : as part of the name of a macro (or
    > any other database object for that matter).
    >
    > Also, I would not use the Dbl Click event of a listbox. Is that what
    > they did in the database template you were basing your work on?
    >
    > The other thing I noticed is the inconsistency in the naming in the
    > information you gave here. For example, you said in your descripion
    > that the listbox is named "Report listing", whereas in the macro details
    > you show it as "lst Reports", yet further down you say it is named
    > "lstReport". 3 completely different names for the same thing. You are
    > probalbly just being careless in your posting here, but accuracy with
    > these types of details are critical, so it makes me wonder whether the
    > problem lies with a spelling mistake somwhere along the line.
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    >
    > Wendy F wrote:
    > > Hi Steve
    > >
    > > The List box has been put directly onto the form, sorry I don't know why I
    > > said on a subdata sheet, but I am still having problems, I tried your
    > > surgestion but it did not work. It said it could not find the report named
    > > Report listing which is what I called my listbox with my reports listed in
    > > it. I tried several times following your instruction carefully each time
    > > still no joy. I got the message switch form out of string space what ever
    > > that means. So I decided to go back to the example that does work in the
    > > template Classroom Management database and see if I could figure out how that
    > > one worked. I followed everything that was set up in that database and did
    > > the same just substituting my listing and named reports etc instead but
    > > basically using everything else the same the following is how it is set up.
    > >
    > > the list box was made from a table/query with the row source as 'Add or
    > > Delete Reports' which is what the query was saved as. It had a default value
    > > set up so I did the same from my lists of reports.
    > > A group macro named View Reports Macros was made up of the following macro
    > > names and actions:
    > >
    > > Name Action Report Name:
    > > cmdOpenReport : On Click OpenReport =[Forms]![View
    > > Reports]![lst Reports] (view: print preview, window mode: Normal)
    > >
    > > EditReportList : On Click OpenForm Reports
    > > (View: Datasheet, Data mode: Edit, Window mode: Normal)
    > >
    > > lstReports : On Click OpenReport =[Forms]![View
    > > Reports]![lst Reports] (View: print preview, Window mode: Normal)
    > >
    > > the command button for previewing the report chosen was named cmdOpenReport
    > > with the caption &Open Report
    > > the command button for editing the listing was named EditReportList with the
    > > caption as &Edit Report List....
    > > the listbox was named lstReport
    > >
    > > In the on click section of the command button field options was typed:
    > > View Report Macros.cmdOpenReport : On Click
    > > In the list box field option for on Dbl Click was typed:
    > > View Reports Macros.lstReport : On Click
    > > In the on Click field options for th command button of the edit report was
    > > typed:
    > > View Reports Macros.EditReportList : On Click
    > >
    > > As I said other than subsituting my set for the other it should have worked
    > > but it did'ent I got the message Switch Board Form A problem occurred white
    > > switchboard form was communicating with the OLE Server or ActiveX control
    > > Close the OLE server & restart it outside of switch board form then try the
    > > original operation again in switch board form. each time a tried to execute
    > > the command. What it wrong with it, it should work but it dos'ent. I am
    > > ready to give up on this. Please help.
    > >

    >
     
  15. Wendy F

    Wendy F
    Expand Collapse
    Guest

    Hi Again Steve

    When I got home I checked the group macros and spelling and everything was
    correct. Also what I said a about Report Listing name I was wrong that was
    when I was trying it your way which did not work. The listbox done copying
    the Classroom Management Database was name lstReport. As I was getting
    nowhere I decided to convert the macros within Classroom Management template
    to see if it would make more sence to you if you see it in Visual basic
    format so here goes.
    ------------------------------------------------------------------------------------------------
    View_Report_Macros_cmdOpenReport___On_Click
    ------------------------------------------------------------------------------------------------
    Function View_Reports_Macros_cmdOpenReport___On_Click( )
    On Error GoTo View_Reports_Macros_cmdOpenReport___On_Click_Err

    DoCmd.OpenReport Forms ! [View Reports] ! lstReports, acViewPreview, "", "",
    acNormal

    View_Report_Macros_cmdOpenReport___On_Click_Exit:
    Exit Function

    View_Report_Macros_cmdOpenReport___On_Click_Err:
    MsgBox Error$
    Resume View_Report_Macros_cmdOpenReport___On_Click_Exit

    End Function
    ------------------------------------------------------------------------------------------------
    View_Reports_Macros_EditReportList___On_Click
    ------------------------------------------------------------------------------------------------
    Function View_Reports_Macros_EditReportList___On_Click( )
    On Error GoTo View_Reports_Macros_EditReportList___On_Click_Err

    DoCmd.OpenForm "Reports", acFormDS, "", "", , acNormal

    View_Reports_Macros_EditReportList___On_Click_Exit:
    Exit Function

    View_Reports_Macros_EditReportList___On_Click_Err:
    MsgBox Error$
    Resume View_Reports_Macros_EditReportList___On_Click_Exit

    End Function
    -----------------------------------------------------------------------------------------------
    View_Reports_Macros_lstReports___On_Dbl_Click
    -----------------------------------------------------------------------------------------------
    Function View_Reports_Macros_lstReports___On_Dbl_Click( )
    On Error GoTo View_Reports_Macros_lstReports___On_Dbl_Click_Err

    DoCmd.OpenReport Forms ! [View Reports] ! lstReports, acViewPreview, "", "",
    acNormal

    View_Reports_Macros_lstReports___On_Dbl_Click_Exit:
    Exit Function

    View_Reports_Macros_lstReports___On_Dbl_Click_Err:
    MsgBox Error$
    Resume View_Reports_Macros_lstReports___On_Dbl_Click_Exit

    End Function

    Does this make anymore sense to you now it's in Visual Basic. I hope so
    because I am totally lost I guess I am going to have to study up on Visual
    Basic more throughly. I really need for this to work. Again all spelling
    was checked and as far as I can see everything was right. I hope you can
    figure this out and get back to me. I don't know what else to do other than
    attaching a macro for each individual report within the list which if you
    have say 15 standard reports would be 15 macro command buttons to setup which
    is a lot.

    Wendy

    "Steve Schapel" wrote:

    > Wendy,
    >
    > I am sorry, I can't give a definitive answer here. But it is sure to be
    > some little details somewhere not right.
    >
    > I am not saying this is the problem... I don't know what the effect
    > would be. But I would not use a : as part of the name of a macro (or
    > any other database object for that matter).
    >
    > Also, I would not use the Dbl Click event of a listbox. Is that what
    > they did in the database template you were basing your work on?
    >
    > The other thing I noticed is the inconsistency in the naming in the
    > information you gave here. For example, you said in your descripion
    > that the listbox is named "Report listing", whereas in the macro details
    > you show it as "lst Reports", yet further down you say it is named
    > "lstReport". 3 completely different names for the same thing. You are
    > probalbly just being careless in your posting here, but accuracy with
    > these types of details are critical, so it makes me wonder whether the
    > problem lies with a spelling mistake somwhere along the line.
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    >
    > Wendy F wrote:
    > > Hi Steve
    > >
    > > The List box has been put directly onto the form, sorry I don't know why I
    > > said on a subdata sheet, but I am still having problems, I tried your
    > > surgestion but it did not work. It said it could not find the report named
    > > Report listing which is what I called my listbox with my reports listed in
    > > it. I tried several times following your instruction carefully each time
    > > still no joy. I got the message switch form out of string space what ever
    > > that means. So I decided to go back to the example that does work in the
    > > template Classroom Management database and see if I could figure out how that
    > > one worked. I followed everything that was set up in that database and did
    > > the same just substituting my listing and named reports etc instead but
    > > basically using everything else the same the following is how it is set up.
    > >
    > > the list box was made from a table/query with the row source as 'Add or
    > > Delete Reports' which is what the query was saved as. It had a default value
    > > set up so I did the same from my lists of reports.
    > > A group macro named View Reports Macros was made up of the following macro
    > > names and actions:
    > >
    > > Name Action Report Name:
    > > cmdOpenReport : On Click OpenReport =[Forms]![View
    > > Reports]![lst Reports] (view: print preview, window mode: Normal)
    > >
    > > EditReportList : On Click OpenForm Reports
    > > (View: Datasheet, Data mode: Edit, Window mode: Normal)
    > >
    > > lstReports : On Click OpenReport =[Forms]![View
    > > Reports]![lst Reports] (View: print preview, Window mode: Normal)
    > >
    > > the command button for previewing the report chosen was named cmdOpenReport
    > > with the caption &Open Report
    > > the command button for editing the listing was named EditReportList with the
    > > caption as &Edit Report List....
    > > the listbox was named lstReport
    > >
    > > In the on click section of the command button field options was typed:
    > > View Report Macros.cmdOpenReport : On Click
    > > In the list box field option for on Dbl Click was typed:
    > > View Reports Macros.lstReport : On Click
    > > In the on Click field options for th command button of the edit report was
    > > typed:
    > > View Reports Macros.EditReportList : On Click
    > >
    > > As I said other than subsituting my set for the other it should have worked
    > > but it did'ent I got the message Switch Board Form A problem occurred white
    > > switchboard form was communicating with the OLE Server or ActiveX control
    > > Close the OLE server & restart it outside of switch board form then try the
    > > original operation again in switch board form. each time a tried to execute
    > > the command. What it wrong with it, it should work but it dos'ent. I am
    > > ready to give up on this. Please help.
    > >

    >
     
  16. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Wendy,

    No, it doesn't really help to see it converted to VBA, as the
    relationship between macros and VBA is very loose.

    I am still confused about your naming. You told me the name of the form
    was Report Listing but in your macro it seems you are referring it as
    View Reports. We have to get this right.

    --
    Steve Schapel, Microsoft Access MVP

    Wendy F wrote:
    > Hi Again Steve
    >
    > When I got home I checked the group macros and spelling and everything was
    > correct. Also what I said a about Report Listing name I was wrong that was
    > when I was trying it your way which did not work. The listbox done copying
    > the Classroom Management Database was name lstReport. As I was getting
    > nowhere I decided to convert the macros within Classroom Management template
    > to see if it would make more sence to you if you see it in Visual basic
    > format so here goes.
     
  17. Wendy F

    Wendy F
    Expand Collapse
    Guest

    Hi Steve

    I decided to start from scratch due to something a work colleague told me.
    Which was sometimes a form or macro can become corrupted for no reason and
    when this happens you have to start again by deleting the macro and the form
    and starting again. I did this and it seems he was right because now
    everything works fine with no problems so I am now sorted. on that front. So
    thanks for your help, I probably did not explain the problems to you the way
    I should have done and probably caused a few headaches for you. But thank
    for trying anyway.

    The only problem I have now is trying to find a way round the fact that
    within my database I have duplicate information ie. parent 1 is asked do you
    smoke, do you want to give up, are you employed, if yes is it full time or
    part time etc. parent 2 is asked the same thing. If I have this on one
    table its a lot of information so I would like to separate them how is this
    best done. Bear in mind I already have the children separated from the
    parents in a separate table with the link to the parents membership ID for
    ie. parent 1 could = member number 1 with the child number as 1/1 for first
    child and 1/2 for second child etc. how could I then connect the second
    parents link within Member ID can I use the same member ID number would this
    clash. I am not sure how best to set this up. Would appreciate your help.
    If I can split this table down into small managable tables it helps.

    Wendy

    "Steve Schapel" wrote:

    > Wendy,
    >
    > No, it doesn't really help to see it converted to VBA, as the
    > relationship between macros and VBA is very loose.
    >
    > I am still confused about your naming. You told me the name of the form
    > was Report Listing but in your macro it seems you are referring it as
    > View Reports. We have to get this right.
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    > Wendy F wrote:
    > > Hi Again Steve
    > >
    > > When I got home I checked the group macros and spelling and everything was
    > > correct. Also what I said a about Report Listing name I was wrong that was
    > > when I was trying it your way which did not work. The listbox done copying
    > > the Classroom Management Database was name lstReport. As I was getting
    > > nowhere I decided to convert the macros within Classroom Management template
    > > to see if it would make more sence to you if you see it in Visual basic
    > > format so here goes.

    >
     

Share This Page