Recent content by Jimmy Turnip

  1. J

    Refering to the currently selected ListItem

    Hello there, I have a form with a ListView ActiveX object. I want the user to be able to double-click on an item in the ListView and edit data related to it. The problem I have is that, unlike the TreeView object, the ListView doesn't have the .SelectedItem property, and I don't know any other...
  2. J

    ListView control won't display columns

    Hello! I'm using a TreeView and a ListView interactively in a form. When the user clicks on a node in the TreeView control, the ListView fills with items relating to that node, obtained from a table. This follows the model presented in...
  3. J

    TreeView and Node properties

    Hi there, I've just begun working out how to use a TreeView control. I can fill it with nodes using data in a table, but that's about as far as I've got. I can't find a definitive list of treeview and node properties and methods that can enable me to do other things, like have the user...
  4. J

    Columns in sub-reports, revisited

    Thanks very much for your replies. I tried all of your suggestions, but with no joy. In the end, I got my solution from Access Help (for once...it was a very special moment for me!). The short version is that you can't have the "down then across" setting in the subreport and the "can grow"...
  5. J

    Columns in sub-reports, revisited

    Hello all, This question was posed by Webbmi on 7-11-00, but got no response. I guess it's worth another shot, though... Basically, is there any way you can get a subreport to be displayed in columns? If you set columns in the page settings of the subreport, they are displayed when you view...
  6. J

    Forcing uppercase letters in a control

    Try using an input mask. E.g. If every value in your field looks like "K345" then use then input mask "L000". If you define it in the table, then it will be automatically copied into any forms that you subsequently create.
  7. J

    Simple form problem

    If I were doing this, I would create an unbound text box, which is used to type in the index of the record you want to update. Call this [txtInputIndex], say. Now, in the OnUpdate event procedure of this text box, add the following code: With Me .Filter = "[MyIndex] = " & Chr(34) &...
  8. J

    How to search wisely in a recordset

    You can use the 'like' operator, e.g. strCriteria = "[MyField] Like " & Chr(34) & "AAA*" & Chr(34) MyRecordset.FindFirst strCriteria This example looks in the field [MyField] for any values that begin with "AAA". Hope this helps
  9. J

    Working with Null values in a recordset

    Thanks for your reply, Chris. The problem was solved when I used... IIf(IsNull([FieldName]),...) ...instead of... IIf([FieldName] Is Null,...) I don't understand why, but the first one works but the second one returns an error. Incidentally, I got this tip by searching old discussion...
  10. J

    Working with Null values in a recordset

    It's OK! I've solved my own problem by using the IsNull() function instead of If Object Is Null ... I love VBA. I love VBA. I love VBA. I love... ---------------------------------------------------- I have code similar to this in my program: With MyRecordset If .RecordCount > 0 Then _ **...
  11. J

    Order By on Form

    Stew, I've not tested this to see if it works, but have you tried swapping your two lines of code, so that it updates the filter details and THEN applies it? JT
  12. J

    Validation Rule

    Charley, You could try changing the Default Value of the Area field in your form to [NameOfAreaComboBox]. This should automatically insert the area code into new records. Note that this would even work if you set the Visible property of you Area field to False, which would prevent the user...
  13. J

    Formatting alternate records in reports

    Thanks a lot, that's a great help. You can also format alternate blocks of records by adapting the AlternateGray procedure to this: intCount = intCount + 1 Me.Section(0).BackColor = IIf(fGray, glrcColorYellow, glrcColorWhite) If intCount = conBlockSize Then intCount = 0...
  14. J

    Formatting alternate records in reports

    I have a report that summarises data in a table-like format. This report usually has a large number of rows in it, and can be quite hard to read. In order to make it easier to read, I want to shade alternate records. Is there a way of doing this? For example, if I wanted the background of the...
  15. J

    Make a copy of a TableDef

    Well, I guess it's sometimes easy to overlook the simple solutions when you've been working on a complicated problem. Thanks very much for your help!
Back
Top Bottom