Search results

  1. B

    DBA Code - Identify if 2 fields within a table have been populated

    Hi folks, need some help with this code, basically trying to identify if 2 fields within a table have been populated i.e. Check date field and restaurant field, if these fields have been populated do this errStr = errStr & tmpDate & ", " Else validStr = validStr &...
  2. B

    DCount

    Thanks Paul, I understand now :)
  3. B

    DCount

    Hi Paul, The ID field refers to a member of staff i.e. if the member of staff has already attended training we don’t need to add them to the database. Basically checking the table, if staffID not found, then run macro and add a new record.
  4. B

    DCount

    Hi folks, need some help with this code, I’m trying to check if a record exits, but I keep getting a error!!! Private Sub Command10_Click() If DCount("*", "tbl", "[ID] = "") <> 0 Then MsgBox "This record already exists.” Else stDocName1 = "McrAddNewRecord"...
  5. B

    join 3 tables

    Hi Aron, please find example attached, look at query 3, study the relationships, all the best. :)
  6. B

    Delete Query – Error message

    Hi Folks, having error message when I try to run this query, Error Message (The Search key was not found in any record) But if I change the MealDate = DateAdd("M", -1, Date it works ok DELETE * FROM TblPatient WHERE EXISTS (SELECT * FROM TblDietPlan WHERE...
  7. B

    Form Design with a Junction table- HELP PLEASE

    Hi Paul, do have a database example or a link to one that I could study with a forms and juction tables?
  8. B

    Form Design with a Junction table- HELP PLEASE

    Hi jdraw, point noted but how would I add new books onto the system via the form, see post above. Hows the weather in Florida, I'm from Scotland and its freezing/Raining
  9. B

    Form Design with a Junction table- HELP PLEASE

    If I have the Author table bound to a main form and the junction table bound to a subform with the master/child link set appropriate. How would I add new book s onto the system via the form? Do I create subformbook and add it to the main form???
  10. B

    Form Design with a Junction table- HELP PLEASE

    Hi Folks, need some help here trying to understand how to create a form with a Junction table. This design will allow a book to have more than 1 author. Author table Author ID AuthorName AuthorID table (Junction table) AuthorFK BookFK Book Table BookID Book Name Author table has a 1 to...
  11. B

    Information not retained within Subform when creating a new record? HELP

    Thanks JHB, I have managed to fixed it, I never added the primary id field into the main form!!! Oh the joys working with Access need to upgrade to MS SQL Server J
  12. B

    Information not retained within Subform when creating a new record? HELP

    Hi folks, need some help here, I have a form and a subform. When I click on the command button to create a New Record and then type the customer details in the Main Form and the Order Details in the Subform, the information is not retained i.e. when I close the Form and then re-open the Form...
  13. B

    Passing data from query to a txtbox on a Form

    I retyped the code a new error message “You can't disable a control while it has the focus" Private Sub Form_Current() If Me.NewRecord Then Me.MealDate = DMax("MealDate", "TblDietPlan") Me.MealDate.Enabled = False Else Me.MealDate.Enabled = True End If End Sub
  14. B

    Block If without End If?????

    I retyped the code a new error message "You can't disable a control while it has the focus" Private Sub Form_Current() If Me.NewRecord Then Me.MealDate = DMax("MealDate", "TblDietPlan") Me.MealDate.Enabled = False Else Me.MealDate.Enabled = True End If End Sub
  15. B

    Passing data from query to a txtbox on a Form

    Hi Paul, the code is producing a error when I open up the form, the error says “Else without if” not sure why as the code has a if statement and end if?
  16. B

    Passing data from query to a txtbox on a Form

    Hi Paul, your code worked great, thanks, is it possible to lock down the date field on the form so that users cannot edit it or change it i.e have the date field greyed out when a new record is created?
  17. B

    Passing data from query to a txtbox on a Form

    Hi Folks, need some help here, I have a form with a date field, when the user creates a new record, I would like the date field to automatically fill with the most up-to-date date from the Orderdate table. Basically I need the code to do the following when a new record is created; Search the...
  18. B

    Select Query - The Most Recent Date

    Thanks Brian, it work great :-)
  19. B

    SOS Validate Date

    Thanks Paul, it worked, where do I send the beer tokens to - Merry Christmas :-)
  20. B

    SOS Validate Date

    Hi folks, need some help please, trying to pass a date field from a Form and check if this date already exists within a table if so run this macro. This is what I have so far... Private Sub Command38_Click() If DCount("*", "TblDietPlan", "[MealDate] = <> txtCusDate Then stDocName =...
Back
Top Bottom