Recent content by JCarmic

  1. J

    Filter query using variables

    Setup the recordsource of form using the open event ie Dim strSQL as string strSQL = "Select * from YourTable where USERFIELD = '" & current_user & "'" Me.recordsource = strSQL Hope this helps John
  2. J

    vb and sql

    try if Me!subForm.Form.RecordCount > 0 then run delete query etc end if
  3. J

    How do I get a form action send its subform to last record

    You can manipulate the sub-from dataset directly ie dim frm as form, rst as recordset set frm = me!SubControl.form with rst if .recordcount > 0 then .movelast frm.bookmark = rst.bookmark end if end with just another way of doing things John
  4. J

    SubForms Record source

    Ignore this post, managed to find answer my self - used the forms property of sub-form
  5. J

    SubForms Record source

    Is there a way to manipulate a sub-forms record source whilst in the parent form. I can't see any sub-form properties that return a record source. I want to allow the user to dynamically change some of the selection criteria applied to the sub-form Thanks in advance for any help John
  6. J

    AutoNumber Help

    I would use the on current event to see if it was a new record and if so, set focus on the first tab and disable the second and third tabs. You can then use the update event on wc_name to enable them Hope this helps John
  7. J

    Enabling/Disabling List Box Entries

    Is there a way to disable a list box entry so that a user cannot re-select that entry, but still have it displayed in the list box Thanks in advance for any help
  8. J

    Sorting Arrays

    Is there an in-built function or has anyone written a function to perform a sort on a one-dimensional array
  9. J

    Date Format Export Problem

    Have you thought about using a query to export the data. You could then use the DataValue() function to strip out the time
  10. J

    Macro Substitution

    Is it possible in VBA to store the name of a variable in another variable and then access the value of the first variable through the second (just like macro substitution in Xbase) ie VarA = 10 VarB = "VarA" Value is &VarB
  11. J

    Recordset and Queries

    You will receive this error message if you do not explicitly set the value of the parameter query when using VBA an example would be dim db as database dim qryDef as querydef dim rst as recordset set db = currentdb set qrydef = db.querydefs.("MyQry") ' sets parameter to current value on...
  12. J

    RecordSheet not Updatable

    The mosy common reason for this is that you have based your query on one or more tables that do not have primary keys. Access will not update the tables if it cannot uniquely identify the appropiate record
  13. J

    Setting Colours On SubForm Datasheets

    I have a form with various records on a datasheet subform ie JobHeader and then various job details. Is it possible to change the colour of a row on a datasheet dependent upon the value of a cell within that row I wish to do this to highlight jobs that have been computer generated as opposed to...
  14. J

    GoToRecord(Form header to detail)

    On the update event of your combo box, add the code : Me!<fldname>.setfocus
Back
Top Bottom