Recent content by kingnothingz

  1. K

    Check all records in a subform based on cbo of main form

    Works like a charm thanks.:)
  2. K

    Check all records in a subform based on cbo of main form

    Believe me, that's exactly how I feel right now. Anyway, I'll try this approach of looping through the dataset and see how I go. Thanks again -kingnothingz
  3. K

    Check all records in a subform based on cbo of main form

    Hi spikepl Thanks for your reply. This isn't a validation rule as such, but is used later for a compliance report on the quality of data. Yes, i know it is better to ensure the quality by adding validation rules, but unfortunately, this is how the end user wants it. The "controlling field"...
  4. K

    Check all records in a subform based on cbo of main form

    Hi All, I have a form with 22 subforms (in about 11 tabs). Each one of these subforms has a controlling field in the main form (table) that dictates if the associated subform needs to comply with data entry rules or not. For example: Field in main form cboMed (Yes; No) Subform: frmSubMeds has...
  5. K

    INSERT INTO vba

    Thanks for your help :)
  6. K

    INSERT INTO vba

    SOLVED! Used DAO instead of INSERT INTO, much more simpler to use. Public Function addBackupLog(strAction As String, strComments As String, strFileName As String) As Variant Dim db As DAO.Database Dim rst As DAO.Recordset Dim strSQL As String On Error GoTo addBackupLog_Error Set db =...
  7. K

    INSERT INTO vba

    Thanks for the reply delikedi, Now i get a Syntax error when i run this. I dont really need the "As Expr1" etc, that was something the query builder came up with. Anyway, i tried doing this, the code shows up red in the VBA IDE strSQL = _ "INSERT INTO tblBackupLog ( dateOfAction...
  8. K

    INSERT INTO vba

    Hi All, I'm trying to create a function that insets into a table. The idea is to use this function to create an entry in table tblBackupLog. I intent to use this to backup the database, and add an entry into the table. Public Function addBackupLog(strAction As String, strComments As String...
  9. K

    Open Record from Union Query

    Hi RainLover, Based on your suggestions, I added the button and modified the code that the wizard created to open separate forms. The final code looks like this: Private Sub cmdOpenRecord_Click() On Error GoTo Err_cmdOpenRecord_Click Dim stDocName As String Dim stDocName1 As String...
  10. K

    Open Record from Union Query

    Hi RainLover, This works great!! Again, i'll have to have two command buttons to open two separate forms Is there anyway to get around this? After making changes that you suggested, the form looks like this.
  11. K

    Open Record from Union Query

    No, I get the results. The search part of it works beautifully. My only problem is I dont know how to open the selected record in another form for editing. Anyways, heres the code for the search. Private Sub cmdSearch_Click() ' Update the record source to get data from UnionQuery...
  12. K

    Open Record from Union Query

    That's quite alright. To make things clear, my search form is based on the example (dbSearchExample.mdb) found in this thread. The Recordset for this form is my union query. I hope this answers your question.
  13. K

    Open Record from Union Query

    Yep, I know that. I'm only using the union query to display from two tables. I'm not adding, editing any records in the form(searchform). Thats the reason I want to open another form to be able to edit records.
  14. K

    Open Record from Union Query

    Its a long story... I didn't design this application, it is handed down to me from some one. i'm not allowed to make modifications to the tables, just build forms on top of them. The tables are similar in most aspects except for some unique fields in each table.
  15. K

    Open Record from Union Query

    Hi Experts, I have an union query getting data from two separate tables. I'm using this union query to search for records using simple text search. Query looks like this: SELECT table1.Name, table1.Surname, table1.DOB, table1.id, table1.diag FROM table1; UNION SELECT table2.Name...
Back
Top Bottom