Search results

  1. H

    How to check if a number is divisible by 6?

    Hi all, As per the title, is there a function that will let me check if a value that was input is divisible by 6?
  2. H

    Is there a code that will allow me to generate tables?

    It's ok guys, I just figured it out! But is there a way to create relationships along with the tables?
  3. H

    Is there a code that will allow me to generate tables?

    Hi all, I am required to write a code that will allow me to generate a table at the click of a button. Is there such a thing? The table name should be Table1, and it contains 7 columns. First column: Auto number (PK) Field1: Memo Field2: Memo Field3: Memo Field4: Memo Field5: Memo Field6: Memo
  4. H

    How to count the number of events based on type?

    I managed to solve it already! I used the debug.print to check my Task and it turns out that the SQL query that was actually running belonged to the first If statement.
  5. H

    How to count the number of events based on type?

    Wellllll, I created it by using the wizard and filled in my own values. Does that count?
  6. H

    How to count the number of events based on type?

    Noted! I can't seem to get this part to work correctly. It's basically for when no date range is input, but the user selects the yes/no dropdown list. When I tested this query, my data in the table didn't even change. PS, I changed Combo9 to "acknowledgement" ElseIf InStr(Me.acknowledgement...
  7. H

    How to count the number of events based on type?

    Well, it works if I change the data type to string and remove the variables. But is this recommended? Private Sub Command8_Click() Dim Task As String Dim startDate As String Dim endDate As String If Trim(txtStartDate & "") = vbNullString And Trim(txtEndDate & "") =...
  8. H

    How to count the number of events based on type?

    Since each table contains the record for the month, I want the count for each event type for the entire month to be displayed.
  9. H

    How to count the number of events based on type?

    Hi Peter! I just did as you said and it worked perfectly! I'm facing another problem now. Every time I run the search code to count the records, and I leave my date fields blank, I would receive this error "Run-time error 94. Invalid use of null." How do I rectify this? I already have a code...
  10. H

    How to count the number of events based on type?

    Hi all, I have a table that contains many records of events. I've already created a multiple item form based on the table. My form contains 2 textboxes for input of a date range and a dropdown box to select "yes or no". What I am having difficulty with is the query that will count the records...
  11. H

    How to select by date range?

    Thanks a million Namliam and Galaxiom! Managed to get what I want by combining both your advice! And thanks for the advice on renaming controls, Namliam, I'll keep that in mind next time!
  12. H

    How to select by date range?

    Thanks for the advice Paul! Just to check, do I use the DateValue() around my variable name or the column name?
  13. H

    How to select by date range?

    Hi all, I am trying to create a form that will select records by date range. The form contains 2 textboxes, with pop-up calendars to select dates. I managed to come up with this code, however, it's not working. Whenever I run the code, my database just goes blank, as though it's selecting...
  14. H

    How to create this type of lookup function?

    Hi! Thanks for replying my question! I just tried your code, and it works to a certain extent. However, it only inserts the correct event type for the first record. Is it possible to do it such that for each record, the code will loop through the lookup table and the loop will end at the...
  15. H

    How to create this type of lookup function?

    Hi all, I have 2 tables. Table 1 contains 2 columns: Details and event type. Table 2 contains 2 columns: Lookup and event type. I am required to write a code that will allow me to read the string of each record in the details column, and if the string contains a certain text, it will input...
  16. H

    How to solve run-time error 3021?

    Hi all, I have managed to sort out the data to be used in the final table. However, I am having trouble transferring the data from each of their own tables into the final table. Each time I run my code I receive "run-time error 3021: No current record." It seems that only my timestamp is...
  17. H

    How to delimit a column into several columns in Access?

    Thanks for the information and advice, Markk and Smig! Managed to do it already :)
  18. H

    How to check positioning of text in VBA?

    Thanks Smig! I managed to get it running already! Learnt a lot about manipulating recordsets from you :)
  19. H

    How to delimit a column into several columns in Access?

    Hi all, I have an imported table and within this table contains a column that needs to be further delimited. I've read that it is possible to delimit columns using the left, right and mid functions, however, I need to delimit it to more than 3 columns. Maybe an estimated 6. Examples of the...
  20. H

    How to check positioning of text in VBA?

    Hi Smig, I did as you said and ended up with this code. Private Sub Command2_Click() Dim IsOK As Boolean Dim dbs As DAO.Database Dim rst As DAO.Recordset Dim rstInsert As DAO.Recordset Set dbs = CurrentDb Set rst = dbs.OpenRecordset("Table5") Set rstInsert =...
Top Bottom