Search results

  1. M

    Populate listbox from paramaterized query in code

    Yeah, starting to think I'm doing something stupid meself OK Dim candidate as String Dim qdfNames As QueryDef Dim rstNames As Recordset candidate = Form_AnotherForm.getCandidate 'this works, i can test with MsgBox Set qdfNames = CurrentDb.QueryDefs("qFindNames") qdfNames.Parameters(0)...
  2. M

    Populate listbox from paramaterized query in code

    Hi Galaxiom I tried your suggestion, but it didn't work - the listbox remained empty. I also tried: set lstNames.Recordset = qdfNames.OpenRecordset, but again, the listbox remained empty. Have you any other suggestions? cheers
  3. M

    Populate listbox from paramaterized query in code

    Hi all I'm trying to populate a listbox with the result of a parameterized query. This means I can't use the properties box to set the list box's query, coz I keep getting the Parameter Value dialog box, but I want to set the parameter in vba. How do I tell the listbox what its RowSource is...
  4. M

    Display data in a form depending on user

    ok, using a subform seems to be working. now to work out how to hide the data before I'm ready for it
  5. M

    Display data in a form depending on user

    Hi all, a simple one (I think) I have a form that I wish to display data on when the user clicks a checkbox. Essentially, on clicking a button in a different form, this form pops up (like a dialog). If the user clicks the 'Show data ...' checkbox (which is the only other thing on the form) I...
  6. M

    'panel' control for forms

    Thanks Dezirous, i used the tab control and changed the Style to none (removes the tabs). The rectangle, as I mentioned doesn't work, because the controls inside don't move with it. Components do move when I move the TabCtl, but it seems that the IDE doesn't always recognise when I click on...
  7. M

    'panel' control for forms

    hi all, hope this is an easy one what control in the form toolbox do i use as a 'panel', ie a container for grouping like functions for design purposes, that I can add other controls to and move 'em all around at the same time. the 'rectangle' sort of looks like what i want, when i set the...
  8. M

    Open new, same form and pause current form execution

    lol, yeah, don't I know it. Fixes are planned for the database redesign, but i'm dealing with an 'interim' solution at the moment - the bulk of the appointments occur in July and the report is due at the end of the month. The problem is now out of the db design area. I can't understand why a...
  9. M

    Open new, same form and pause current form execution

    Ok. Sorta managed to create a subform and get it to become visible when I want, but I still have the problem of getting current code to pause while I do actions in the sub/new form. Just like my attempts at the 'form as dialog' and the knowledgebase article suggestions, the code continues and...
  10. M

    Open new, same form and pause current form execution

    hi lagbolt, HiTechCoach Both suggestions (OpenForm as acDialog, and the knowledgebase article) seem to result in the code continuing on. (I added: MsgBox "Form has opened. You are back in the calling method" immediately after the DoCmd.OpenForm / Set frmX = new Form line and it was invoked in...
  11. M

    Open new, same form and pause current form execution

    Hi all, I have a form that is used to vacate member and office positions (on resignation etc) for a number of different bodies. Rules are that when a member vacates their member position, they must vacate their office position, if they have one. However, a member can vacate his/her office...
  12. M

    Lookup fields - removal

    thanks guys, looks like it's all worked ... now I've just got to deal with all these backup copies I have floating around :)
  13. M

    Lookup fields - removal

    Hi, after finding out about the evils of lookup fields, I'm attempting to remove all these that have been added in the table design of our database and would like confirmation before I go charging in that I won't hurt anything. Can I just go through each table definition and change the Display...
  14. M

    access vs sql

    hi pbaldy yep, there is definitely lookup field 'technology' being used. i guess the strategy from here is to go through the table definitions, removing the lookups, then run the queries to see the changes in results and then JOIN the metadata tables back into the queries? is there a...
  15. M

    access vs sql

    hi all, what access trickery can you use to stop fields and rows appearing in the order that they should according to straight sql? I'm maintaining a database that somehow manages to have fields come out in a different order than they are SELECTed (which I'm attributing to lookup fields, but...
  16. M

    Subquery? for total within same table

    Hi neileg, how do I do this when the calculation depends on adding field values from this table. i use the field I want to sum as the <<expr>>, the table as <<domain>>, but what is the criteria? It would be something like all the company fields that match the company field for this record. My...
  17. M

    Subquery? for total within same table

    Ha! sorted. I had to alias the tables in the select statements so that the table could be joined to itself. So, select t1.company, t1.sectionname, t1.numberofstaff, (select sum(t2.numberofstaff) from staffcount t2 where t2.company = t1.company) from staffcount t1 :)
  18. M

    Subquery? for total within same table

    Hi, I have a table with Company, SectionName, NumberOfStaff, and I want to run a query that shows this data, plus a column for the total of staff in each Company, obtained by adding the staff in the different sections. I'm obtaining this number via its own query using Sum(NumberOfStaff) and...
  19. M

    'Cannot open any more databases' error

    Hi again. OK, solved, or at least, working. When I investigated, I found that the report was using a certain query as its record source. Subreports were using additional queries. Those queries were then also using the report's main query. That main query has at least three levels of nested...
  20. M

    'Cannot open any more databases' error

    Hi DCrake, tried what you said, but in reverse order. Ie, took a blank copy of the Front End (just the linked tables) and imported the macro and then ran it, importing each new bit (query, report, macro, whatever) it needed as it asked for them. In the end it hit the same problem. Will try...
Back
Top Bottom