Search results

  1. B

    Check for Future Dates

    Hi folks, I have created a function to check for future dates, but how do I make it generic. I am assigning the function 'Before Update' on the textbox property. I do not want to type each textbox name, any help much appreciated. code below Public Function CheckDate() Dim myDate myDate =...
  2. B

    close a form using vba from a command button...

    Hi folks, is it possible to close a form using vba from a command button, then reopen the form at the same record that you closed from?
  3. B

    Adding the value of 4 textboxes

    Hi folks, I need to add 4 textboxes, I was think of adding within the Control Source of another textbox like so textbox= ([textbox1]) + ([textbox2]) + ([textbox3]) + ([textbox4]) But if any of the textboxes are null, the formula does not work!!
  4. B

    Set multiple default values within a datasheet layout

    Hi folks, how do I set multiple default values within a datasheet lay out. I would like the datasheet to display 3 default values i.e. Column Name - CakeName Default value 1 Chocolate Cake Default value 2 Strawberry Cake Default value 3 Toffee Cake
  5. B

    Max Date

    Hi folks, need some help with displaying the max date sql code below; SELECT TblDietPlan.DietPlanID, TblDietPlan.ClientID, TblDietPlan.MealDate, TblDietPlan.MorningSnack, TblDietPlan.AfternoonSnack, TblDietPlan.EveningSnack FROM TblDietPlan WHERE (((TblDietPlan.ClientID) Is Not Null) AND...
  6. B

    Delete Qry

    Hi folks, need some help here, I am trying to run a delete qry when patient treatment is complete. I would like the qry to run if the Date Treatment Complete field is more than 28 days old, code below. DELETE * FROM tblPatient WHERE EXISTS (SELECT * FROM tblReferral WHERE...
  7. B

    Achieve Data

    Hi folks, I’m using Access 2007, I need to achieve some data from my database, what is the best way to do this. I have a one to many relationship database, so 1 customer could have many orders, how would you achieve this data? Open to ideas....
  8. B

    Pop-up

    Hi folks, is it possible to have a pop-up from a textbox that has a calendar picker. i.e. if you have a textbox formatted as a date field that has a calendar picker, that pops up every time you click in the box. I would like a pop up to appear next to the date picker to say please ensure you...
  9. B

    Subform creating orphan records

    Hi folks, how do I display a more meaningful message instead of the cryptic error about having to enter data into blah blah blah. How can I trap that error and provide them a more meaningful message about entering data. I have tried the following; Main form name frmPatientRecords Sub form name...
  10. B

    Query & Textbox

    Hi folks, quick question I have textbox on a form. I also have a query that displays a date, I would like this date to be displayed within the textbox, not sure how to do this, thanks in advance.
  11. B

    Concatenate 3 queries to 1

    Hi folks, need some help with queries & reports, I have 3 queries; QryMorning_label QryAfternoon_label QryEvening_label And then have 3 reports; Morning_Report_labels Afternnon_Report_labels Evening_Reoprt_labels I need to print all the reports as 1 report to save on labels i.e. when...
  12. B

    Data validation

    Hi folks, I need some help here; I have 4 kitchens that use the same database to print their labels. Each label contains customer name, location and date of meal. The kitchen prints their labels at different times of the day; sometimes they will accidental hit the print button more than once...
  13. B

    New Record Validate

    Hi folks, I’m trying to do the following; If a new record is created, insert date only if customerID is not null Private Sub Form_Current() If "CustomerID", "TblDietPlan" = <> 0 Then If Me.NewRecord Then Me.MealDate = DMax("MealDate", "TblDietPlan") End Sub
  14. B

    Combo box

    Hi folks, I am using combo box to filter records from a form. The data source for the form is from a query. I use the combo box within the query to filter the data, I would like the form to refresh/ run the query again every time a new selection is made from the combo box. Any help would be...
  15. B

    VBA Validation

    Hi folks, changing my code slightly to take into account a combo selection on a form, but it is not working! Basically trying to validate if the order query has been executed by checking if the date And Restaurant name selected has been already added to the order table. If DCount("*"...
  16. B

    Retails & Products

    Retailers & Products Hi folks, I am designing a database that will hold many products from a variety of suppliers. The problem is that most of the products are the same i.e. I am entering the same products details in the product table 100 times or more from different suppliers. The only...
  17. 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 &...
  18. 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"...
  19. 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...
  20. 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...
Back
Top Bottom