Search results

  1. A

    How to choose the 10 latests entries in a table (from a form)

    The way it works is that I enter the data for the table in another form. Here I, among things, enter the arrival date and the departure date. The time is not used. Sometimes port calls are very close to each other, meaning you could arrive port number 1 at 0200 hours in the morning, and leave...
  2. A

    How to choose the 10 latests entries in a table (from a form)

    Thanks. Worked like a charm (more or less). A couple of additional questions: 1. The 10th and the 11th entry in the table have same arrival dates, and because of that they are both included in the 'search' result. How do I make sure that it is only the 10 newest entries which are included? 2...
  3. A

    How to choose the 10 latests entries in a table (from a form)

    I'll start by saying that I'm not sure which sub-forum to choose, as my question(s) covers several areas, so I have tried with this one first. I'm currently making a database, which among other things contains a 'Port of Call list' table. I have a form, where I can add data to this table...
  4. A

    SQL statement

    I have the following SQL statement: strSQL = "SELECT DISTINCT tblDeadline.Direction FROM tblDeadline " strSQL = strSQL & " WHERE tblDeadline.Port = '" & cboPort.Text & "' AND tblDeadline.Service = '" & cboService.Text & "'" strSQL = strSQL & " ORDER BY tblDeadline.Direction;"...
  5. A

    Importing tables from other access database using code

    When using below code, all tables in the current database are deleted, after which all tables from selected database will be imported. Private Sub cmdImport_Click() On Error GoTo Err_cmdLinkTables_Click Dim strFileName, strTableName, strImport As String strFileName =...
  6. A

    Importing tables from other access database using code

    Chris, Thanks a lot. Worked like a charm. I have some additional questions, though, for which I hope you can help. 1. When clicking the 'Cancel' button in the 'Select a file' dialog, I just get a box, which states 'invalid aragument'. What I would like, when clicking the 'cancel' button, is...
  7. A

    Importing tables from other access database using code

    Does anyone know how to import tables from another access database file, by using code? What I'm looking for is code for a button, which will let you browse for a specific file. When file is chosen, it should show path in a text box, and after you click on an 'update' button, all tables from...
  8. A

    Scroll bars in a text box

    In stead of using a normal text box, I tried with a "Microsoft Forms 2.0 ActiveX text box" control. When using this control, the scrollbar is visible when there is data in the text box, even if it doesn't have the focus. Thanks for your help anyway.
  9. A

    Scroll bars in a text box

    Appreciate all your help so far. I haven't got my problems solved, though. Perhaps I should have mentioned a little bit about the size of this txt box, and the table that populates it. The specific field in the table, is of the "memo" type. Furthermore, the txt box is what equals 5 lines in...
  10. A

    Scroll bars in a text box

    No, but the textbox has a certain size, which can't/shouldn't be changed. As the user can't see how much text there is, then he/she would need to select that textbox each time, and scroll down to check. It is a little bit like when surfing on the internet. When the vertical scroll bars in the...
  11. A

    Scroll bars in a text box

    No, but the textbox has a certain size, which can't/shouldn't be changed. As the user can't see how much text there is, then he/she would need to select that textbox each time, and scroll down to check. It is a little bit like when surfing on the internet. When the vertical scroll bars in the...
  12. A

    Scroll bars in a text box

    The text boxes on this specific form are all 'view only', i.e. locked, for some users. The txt box in question is for 'remarks'. If there is a lot of text in this txt box, then the user can't see how much, unless the scroll bars are active when the form loads.
  13. A

    Scroll bars in a text box

    I have a text box on a form, where the Scroll bars properties has been set to 'vertical'. My problem is that the scroll bars only show up, when the text box has focus. If I move focus to another control, the scroll bars disappear. Furthermore, the behavior is the same, no matter whether the text...
  14. A

    Center form on screen

    That was easy. Thanks.
  15. A

    Center form on screen

    Is it possible, when using 'Private Sub Form_Load()', to have a form centered on the screen.
  16. A

    Clearing multiple txtboxes

    I'm looking for a way of clearing several txtboxes on form, when clicking a button. I know I can use: txtNo1.Value = Null txtNo2.Value = Null txtNo3.Value = Null etc But I assume there's an easier way of doing it, I just don't know how. Anyone??
  17. A

    Code to show data in txt boxes

    I have a form with 2 combos, 6 txt boxes and 1 cmd button. When a user click the cmd button, the 6 txt boxes should show data from a table, which corresponds to what is entered/chosen in both combos. If a combination in the 2 combos is not available, a msgbox should pop up stating same, and if...
Back
Top Bottom