Search results

  1. C

    Mix Expression and criteria in same field

    My query has a number of calculated fields which pass a value down the line and ultimately gives me a date. The final calculated field in the query is Date()+[DaysLeftToLim] AS LimFilter what I would like to do is filter the records using a criteria, in this case a number of days before the...
  2. C

    variable syntax in rs.Findfirst.

    That did it! Just so I understand this fully. It it the case that Dim'ing the variable as a string is not the same as a literal string in an expression hence the need to surround in chr(34)? If the point above is true would the same method be used say in a Dlookup situation? And again...
  3. C

    variable syntax in rs.Findfirst.

    Hi Thanks for reply but still no joy "Jet database engine does not recognize 'Administrator; as a valid field name or expression". When I put a watch on Uname the variable is assigned correctly as "administrator" so other than syntax which I assumed was the issue I don't know what I am doing...
  4. C

    variable syntax in rs.Findfirst.

    Hi I am using the api fosusername() function as the source for my search in the FindFirst method. Dim Uname As String Dim rs As Object Uname = fOSUserName Set rs = Me.Recordset.Clone rs.FindFirst "[UISID]" = Uname ' If Not rs.EOF Then Me.Bookmark = rs.Bookmark...
  5. C

    Set recordsource by a list of queries in combobox

    Knowing I was at least in the vicinity I tracked my problem down to using the wrong event type, should as I now rather embarrassingly realise should not be the before event.. Thanks for narrowing the search!
  6. C

    Follow hyperlink from string

    I'm no authority I can assure you and I'm only referencing the article by Allen Browne. As to the issue of API's well I am certainly not qualified to comment, I don't really understand the code entirely but it seems to work in my particular project, I'll no doubt learn of any issues fairly...
  7. C

    Follow hyperlink from string

    Thank you both. I had been warned off the followhyperlink by some other posts so I'm especially grateful for the API method, albeit the code is way in advance of my modest abilities. This is sure to be added to my ever growing library of utility modules.
  8. C

    Set recordsource by a list of queries in combobox

    I have a dozen or so queries which I intend to filter a main forms underlying data. This qry count will doubtless increase with development. Rather than have a dozen buttons on my form I'm trying to have a combo box list the names of the queries for the user and once a particular query has been...
  9. C

    Follow hyperlink from string

    The following code works but my instinct tells me this is not good coding and might cause me issues later, any suggestions? If it helps define the links will always be http:// links rather than file links. Private Sub WebLink_DblClick(Cancel As Integer) Dim myLink As String If Not...
  10. C

    For..Next question

    I must admit I wasn't really understanding the response first off and had to go back to looking at this line by line over and over. When I finally got my head around the logic and had figured out what it was I was missing it was of course exactly exactly as you had said. I'm guess this is all...
  11. C

    For..Next question

    I have a validation routine behind cmd button 1. For Each ctl In Me.Controls If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox Then If Mid(ctl.Tag, 3, 1) = "£" And Trim(ctl & "") = "" Then ' i = 1 (my hairbrain idea) msg = "Data Required for '" &...
  12. C

    Compare multiple values in ctl.Tag using Like function

    I think I may have thought of an easier solution so thought I would share it. If Mid(ctl.Tag, 3, 1) = "£" And Trim(ctl & "") = "" Then By using the Mid function I can test for a character match at the position stated in the Start arg, in the case above "£" at position 3 in the tag property...
  13. C

    Compare multiple values in ctl.Tag using Like function

    Is it possible to use Like when comparing the value in a ctl.Tag I am trying to adapt the following validation routine so that it can be put behind a number of different command buttons to test for a different string in the tag property of the control. The code would be copied replacing the...
  14. C

    api username call to restrict record editing

    Brilliant! Thank you both. And Mr Larson you were of course spot, I was retrieving the wrong field from the table in my example. My first working Dlookup and with a function variable to boot! May not seem much to you guys but this is revolutionary to me and I can think of many other uses for...
  15. C

    api username call to restrict record editing

    Thanks for that quick reply I have pretty much have that, albeit I haven't gone as far as creating a separate group table. I know I should but I was trying to keep the code to as simple as possible and have simply included the authority levels in tblEmployees for now Do I take it my thought...
  16. C

    api username call to restrict record editing

    I am trying to restrict access to different records using the api username call. The function is the fosusername() code which I guess everyone will be familiar with. At the moment all controls on a record are locked unless: fosusername() = Me.TopicOwnerUserID This is all working fine...
  17. C

    Pass unbound form control to query

    Apologies for the delay returning on this but been away. It turns out I do need the VBA calculated value stored in the table for other duties so set the record source from the Me.txtLimitationDate control to a field in the table. Thanks for looking and I certainly picked up a new tool in your...
  18. C

    Pass unbound form control to query

    Hi, Thanks for the info but I'm still not clear I'm afraid. Something pretty fundamental I'm missing here I'm sure. Forgive me for hashing this out long hand but its the only way I can think to explain it. I have a 2 bound date fields on a frmMain which in conjunction with the present...
  19. C

    Pass unbound form control to query

    Hi I have some pretty basic code on the form current event which after navigating a number of logical statements generates a date. that value is then reflected in an unbound control txtLimitationDate on my users form. i.e Me.txtLimitationDate.Value = LimitationDate I would however like...
Back
Top Bottom