Search results

  1. A

    Extracting a list from a query

    :confused: I have a query with a list of email addresses in it, one per record. Is there a way of getting these into a list, each one separated by a comma, so that I can copy and paste it into an email? The list could be a form with one large unbound field to temporarily place the email...
  2. A

    Showing a calculated field on a report

    In case anybody is interested I have a method! Although a bit clumsy it will do: When I click on the command button to print the report I have made the event procedure first fill an invisible bound text box with the Report Ref (me.ref=me.report_ref) followed by save record. The value is saved...
  3. A

    Showing a calculated field on a report

    David - Thank you for your help. I should have mentioned that the form is actually a subform (I don't know if this makes a difference). Also, Im reasonably new to Access! Currently the main form [frmNewResults]is based on a query [qryNewQuery] and the subform [frmP1] is based on [tblP1]...
  4. A

    Showing a calculated field on a report

    Hi all, I've read many topics advising not to store a calculated field in a table whilst searching for the answer to this. I have a field in a form called "ReportRef" which is calculated on the date that the record was created and record number. All I want to do is have this printed at the top...
  5. A

    Display only last two digits

    Fizzio, I've changed to the me. prefix and checked that the format is set to 00 and, alas, it just won't play! Maybe it's because I'm using Access97 and you're on 2000? Just wondering if this is a limitation with A97... Anyway, thank you for all your help. It looks like I might just have to...
  6. A

    Display only last two digits

    Fizzio, Thanks for the tip about calculating all the fields on OTDR Index1. That makes good sense. It is highly unlikely that a value would get as high as 99 or more, but if it were to happen then 115 would need to be displayed as 115. It is so unlikely that I feel it isn't necessary to cater...
  7. A

    Display only last two digits

    Hi Fizzio - glad to have you back! I need to store the value in the underlying table (don't mind if this is three digits ie 006) and to display just two (ie 06). I just tried setting the format to 00 and this still displays "011" instead of "11". I guess this is because my code: "[OTDR Index2]...
  8. A

    Display only last two digits

    Thanks Fizzio. This is clever stuff but unfortunately won't solve my problem as there are in fact 24 of these little text boxes and I really don't have the room on the form for another 24 unbound text boxes. (Nor do I want the confusion of all those!) The heart of the problem really is that...
  9. A

    Display only last two digits

    Hi all. Is there a way to make a text box display only the last two digits? eg '105' is displayed as '05', '115' as '15'. I have tried the following in the format property for the text box which I read on the forum here but they don't work: "Mid([Otdr Index2],2,2)" or "Right([Otdr Index2],2)"...
  10. A

    No leading zero after update

    Oh so simple!! You are a genius. Thanks very much indeed. Ali
  11. A

    No leading zero after update

    Hi!! I have 24 text boxes (OTDR Index1-24) on a form with default values of "01" to "24". Often however, the first of the boxes will need to be (say) "05" and I want the following boxes to auto fill incrementally after I have typed "05" in the first box. I have done this with a simple after...
  12. A

    World Time Calculation

    Got it! Made up a separate form that references the time difference in my main form. Private Sub Form_Open(Cancel As Integer) 'Time = DateAdd("h", [Forms]![Master Input Edit]![Time Difference], [UK Time]) Forms![Time]![UK Time] = Now() Time = DateAdd("h", ([Forms]![Master Input...
  13. A

    World Time Calculation

    Hi all! Surely this has to be simple but I'll be jiggered if I can make it work..... I have a field which is called 'Local Time' and in it is a value depending on the time difference between that country and mine, say "+7" for Brunei and "-12" for Hawaii. How do I get the local time to show...
  14. A

    Why won't my 'Do Until Rst.EOF ' statement work?

    Thanks everyone - got there in the end with the following: Private Sub Cycle_Records_Click() Dim stdocname As String Dim Rst As Recordset Set Rst = Me.RecordsetClone Rst.MoveFirst Do Until Rst.EOF Rst.MoveNext ' Next in Rst If Not Rst.EOF Then Me.Bookmark = Rst.Bookmark ' Next in Form End If...
  15. A

    Why won't my 'Do Until Rst.EOF ' statement work?

    Long story....Basically I have 200 labels and 200 images in a form. The images only become visible if there is a corresponding record in the underlying query. I'm using the following code to do this: Private Sub Form_Current() If Me("Spare Keys") = "001" Then Image1.Visible = True ElseIf...
  16. A

    Why won't my 'Do Until Rst.EOF ' statement work?

    Thanks Harry. It doesn't move the records at all, just stays on record 1. I'm using Access 97 - is that a problem? Thanks again
  17. A

    Why won't my 'Do Until Rst.EOF ' statement work?

    Thanks John. I tried that but it doesn't have the effect I need. I really need it to step through all the records but stop when it gets to the last one without giving me the error message.
  18. A

    Why won't my 'Do Until Rst.EOF ' statement work?

    Hi! Can anyone tell me why I get the message "Cannot go to the next record. You may be at the end of the recordset"? I am trying to stop the procedure when it gets to the last record..... Many thanks all.. Private Sub Cycle_Records_Click() Dim stdocname As String Dim Rst As Recordset Set...
  19. A

    Accessing the value in an underlying Query's field

    Thank you for your reply. Unfortunately it doesn't work as the form shows only one record at a time. If I scroll through the records the image becomes visible when the record "001" does but then the image stays visible. Is there a way of having a form show all the records? To be more specific...
  20. A

    Accessing the value in an underlying Query's field

    I'm struggling with a bit of code here. What I'm trying to do is make an object in a form visible if a certain value in the underlying query exists. So I have the query called "Spare Keys" and the form based on that query. The only field in the "Spare Keys" query is called "Spare Key". So if...
Back
Top Bottom