Search results

  1. K

    Adding a form field that is a "Last Saved by"...

    I have a less foolproof solution to this than offered by the other gents that may be suitable to your needs. Various comment recording tables in my database have a 'CommentBy' field which is required. When the user makes a new comment via the subform, he/she must select an identifier (their...
  2. K

    Populate variable using SQL

    Hi Peter, Thanks for responding. I haven't used ADO or DAO (other than when blindy cppying code). Could you give me a pointer as to what you are suggesting I try i.e. what sort of structure would my code take? Thaks in advance for any tips etc.
  3. K

    Populate variable using SQL

    Thanks for the responses guys. MStef, I haven't made my situation clear - sorry. I am trying to run an SQL query in VBA. Bat17, The variable I want is not simply a value in a table. I am trying to pull the values from 2 fields in one table using an inner join and where clauses etc. I don't...
  4. K

    Populate variable using SQL

    I want to use SQL to populate a variable that is used elsewhere in my code. none of the various methods I have tried work so I was wondering if this is possible in the first place and if it is, what is the syntax/structure of the code? Dim DeptOrder As String DeptOrder.DoCmd.RunSQL SQLText &...
  5. K

    set combobox row pointer

    Many thanks Lagbolt Thanks Lagbolt - works a treat. It took me a couple of days to work this out as I was modifying a whole host of other things at the same time, most of which didn't work first time out!:) BTW, is this you: Lag screw, lag bolt or coach screw refers to a large wood screw...
  6. K

    Form moved too far down 'page'

    pharison, Glad it all worked out. As far as I can tell (I really am an amateur!) your code was ok. My only tip when weird things happen is to compact and repair. If they persist, create a new item and migrate the controls across 1 at a time until the problem re-appears or try commenting out...
  7. K

    set combobox row pointer

    I have a combobox that may be used a number of times. It is populated by a query in VBA using rowsource = SQLText & WClause etc which sorts it in a particular fashion. Currently, when a user clicks the drop down list, the last selected record is at the top of the list and if the user wants to...
  8. K

    Form moved too far down 'page'

    Have you tried using the movesize in the on open event? You can use this to position a form relative to the top and left of the screen.
  9. K

    filtering a subform - when is a subform 'loaded'?

    Thanks RG. I have seen that page before but didn't twig that my problem lay in the referencing. I'm sure that I wil be able to get it going tomorrow when back at the office. Regards,
  10. K

    Last line of text from a memo field

    Just a thought now that your problem is solved. If you need this data separately, why don't you have a dedicated memo field for whatever is placed in the last line/sentence? This would give you plenty of flexibility to use it separately or concatenate it with the rest of the memo if needed...
  11. K

    filtering a subform - when is a subform 'loaded'?

    I have an SQL query that filters a subform based on the selected item in an option frame that runs on the after update event of the option frame. Forms!fsubPrjPersonnel.RecordSource = SQLText & WClauseWhen I try this out, I get the following error message: I then ran the following snippet and...
  12. K

    Use SQL in VBA to populate a text box on a form

    Thanks for the response Sam. I tried various versions of defining variables and trying to make them = sqltext so that I could then set the text box to that value but couldn't get the hang of it. I'm guessing this can be done and will be simple, I just can't figure it. Regards,
  13. K

    Use SQL in VBA to populate a text box on a form

    I know how to do this with a combo box. After defining the SQLtext and WClause something like: with me.cbocombobox ____.rowsource = SQLtext & Wclause ____.requery end with How do I (can I?) use the SQL in VBA to populate a text box in a similar manner? I have tried various versions of...
  14. K

    form filter by many side table

    I want to filter a form based on the many side of a 1 to many relationship to the records on the form The form shows projects which can be associated with more than one asset. There is a junction table to hold the asset assignments with a many to 1 relationship to the project details table...
  15. K

    A Father’s Bragging Rights.

    Like MrsGorrilla, my children are still young and so the jury is still out on my parenting skills. However, like her, I have been immensely gratified by the politeness shown by the children, with unforced 'Please' & 'Thank yous' etc. This is mostly down to passive modeling which is why we also...
  16. K

    Print a Column Horizontally

    Thanks Pat, I did create a form in pivot table view which I then inserted into the report. The data was correct but I was unable to control the formatting, remove the '+' and '-' expand/collapse buttons etc. If I could somehow strip out the pivoted data and drop it into a subreport that I...
  17. K

    Can I use SQL to populate a text box on a report?

    Can I use SQL to populate a text box in a report? The source table has 1 field for employees assigned to projects, and I want the report to show employees for each project broken down into the sections they work in. The desired result would look something like this: Project XXXXXX...
  18. K

    Flickering screen

    Hi Bee, I think there are a number of threads on this subject or very similar problems and a few different solutions. Search for 'flickering' and variations on that theme. In my case, the flickering was related to the labels of a control. I deleted some 'mouse move' event code. From memory, I...
  19. K

    Print a Column Horizontally

    Bump Any hints at all welcome :D
  20. K

    A Father’s Bragging Rights.

    Lovely. Nice to hear that she likes you again. This is all future for me as I have 3 under 4 who haven't learnt that dadies can be a pain yet. The reason I work in Arabia is that I do 40 hours with 15 minutes comutine each day (yes, there & back!) that's about 20 hours more than I would have...
Back
Top Bottom