Search results

  1. C

    Check record exists code needed

    hi there, I want to put some code behind a 'Delete' button on my Client form that will check whether an associated Booking record exists or not. If it does then then form will return the message: "Cannot delete Client as associated Booking records exist." The two tables Client and Booking both...
  2. C

    Filtering date field by month to open report

    My form has buttons to open a report for records with [Date of Appointment] either: 2 months ago, 1 month ago, current month, next month or next month +1. The report it opens is based on a crosstab query that contains the [Date of Appointment] field which is a Date/Time field of format Medium...
  3. C

    Array beginner

    Hi there I want to build a report (based on a query) and think that using an array is the best route except I've not done one before. The report is to list the days of a month down the first column. Each subsequent column is to hold diary details for an individual clerk (which are held in my...
  4. C

    Month Changer

    Hi there, I'm looking for some code to get a value of format 'Month YYYY' for this month, this month +1, +2 and this month -1 etc., then put it into a caption, but will be using it for other things too. I've tried the following: Dim Month1ago As Date Dim Month2ago As Date ... Month1ago =...
  5. C

    Print Preview Report/ Subreport issue

    Hello! I have a print button on several forms that has the following code behind it: DoCmd.OpenReport strDocName, acViewPreview, , strWhere This means that a report version of the current form opens in Print Preview and the user can right click the report to print/ email as attachment/ export...
  6. C

    Email report from form in exported format

    hi there! I've a print button on my form that prints a report version of the same current form. This works fine. I would like now to add another button to the form that opens the email editor with the report version as an attachment. Since the email recipient is unlikely to have Access...
  7. C

    Subform Undo code not working.

    Hi there! My form is based on a Booking table. This form has a subform based on a Booking Status table. The booking table has a one to many relationship with the Booking Status table. I've coded a 'Close' button on my main form which asks the user whether they wish to save changes or not. If...
  8. C

    Subform record deletion from main form

    How do I delete a subform record from the main form using vba? Thanks in advance! Catherine
  9. C

    Conditional formatting for certain records

    Hi there! My report lists appointment records for inventory services at rented properties. Each record contains several pieces of information. When two different criteria are met simultaneously for a record, I want to change the font colour for that particular record to red. How could I do...
  10. C

    Database crashes upon report print command

    Bit of an ugly one this! I'm using Access 2007 and am wondering whether this is a bug or something I've done ... anyway I did notice that the preview content did not match the printed content. When Access crashes it prompts me to send a lengthy error report to Microsoft and then offers the...
  11. C

    Populating text fields in Reports

    Hi there! I can't seem to get any text fields to populate either via using some VBA within the Report_Load sub nor via the property control source. Here's some examples of what I 've tried: Within VBA: Me.Text2 = Forms("Job Form").[Text23] and then using the property control source...
  12. C

    VBA changes and saving a form as a report

    Hi there! I'm new to reports and want to create some report versions of the forms I've already created. My forms all have quite a bit of VBA behind them. To create a report, I've copied a form and re-saved it as a report object type. The VBA behind looks exactly like that of the original form...
  13. C

    Null value not recognised in conditional statement

    Hi there! I've an If ... End If statement that's not working properly. Can someone advise how I should be coding this please? If Me.postcode.value = Null Msgbox "Postcode field must be populated." Endif I'm using Access 2007. The postcode is defined at table level as a text field. I've also...
  14. C

    Next record button runtime error

    Hi there! The first line of this procedure (If Me.LastRcd = True Then) is producing a runtime error 438 - 'Object does not support this property or method'. What code should I be using instead? Private Sub NextRcd_Click() If Me.LastRcd = True Then MsgBox "No further Booking/ Job records...
  15. C

    Combo when non-drop down display issue

    Hello! I've used unbound combos on several of my forms and am wondering how to get them to display their multiple column values (either default or selected) fully. When a user clicks on the drop down arrow of a combo, all columns (aside from the hidden one) are displayed apart from the main...
  16. C

    Synchronising updates on subform with main form

    hi there! I have a subform imbedded in a main form. The main form has a one to many relationship with the details in the subform. The subform's properties are set to Single Form rather than Continuous Form. The main form is a Booking Form and the subform is a booking status form with the...
  17. C

    Form using multiple tables issue

    Hi there! I'm attempting an ambitious form or maybe its quite straightforward, perhaps someone can advise me please: I am trying to create a powerful form that will have access to data from 8 tables. They are all interrelated via foreign keys and one to many relationships. 3 of these tables I...
  18. C

    Type mismatch inconsistency bet. forms

    I've the following piece of code that works fine in one form but throws up a runtime error message '13' that says 'Type Mismatch' in another form. The code is: Private Sub Combo48_AfterUpdate() Dim ONumID As Integer ONumID = Combo48!Column(0) DoCmd.ApplyFilter , "[Office ID] = ONumID" End Sub...
  19. C

    If.. Endif statement not working

    Hi there - I seem to have a data type mismatch or something - the following simple If...End If statement is not working: ... 'Check House Name/ Number and Postcode are populated: If Me.House_Name__Number.Value = Null Or Me.Postcode.Value = Null Then MsgBox "Both House Name/ Number and...
  20. C

    Passing parameters between forms.

    I've been going round in circles for a while with this one and I'm sure there's an easy solution - I just can't see it!! Anyway, I have two forms both based on the same table: Property which has a primary key "Property ID". Form1 asks the user to select a property using the a combo button. The...
Back
Top Bottom