Search results

  1. L

    Printing from form to report

    Use the following command in the on_click event in a command button. Where PK is the record identifier in your underlying table or query and txtPK is the name of the control displaying this on the form (I hope that is clear!!) DoCmd.OpenReport "NameOfReport", acPreview, , "[PK]=" & Me![TxtPK]...
  2. L

    Run Time Error '429'

    I found this link in another post from accesswatch http://www.mvps.org/access/bugs/bugs0007.htm Hope it helps
  3. L

    Static Auto dates

    I dont know if this covers exaclty what you want but if you put Now() in the default value of the text field on the form holding your date, the date will automatically pop up as the date the record was added and this could be amended if you want.
  4. L

    Subform linked to parent form data

    Try setting the default value of companyid in the subform to the companyid on the main form if the relationship is one to many this should only bring up the employees linked to the particular company.
  5. L

    Grouping

    I've created a report which groups on a court date by month I would like to create a running total for each court date by month, but when I create a footer for the court date and add the count(*) it totals by the actual date rather than month! Any help would be appreciated (again) Lorraine
  6. L

    CancelEvent

    Alexandre Thanks again for the reply
  7. L

    CancelEvent

    Thanks for the reply However, it is a report I am closing and there doesnt appear to be an unload event. Does anybody have any ideas how I can ask the user if they have saved the report to word before they exit thanks in advance Lorraine
  8. L

    CancelEvent

    I have the following code in a report. Private Sub Report_Close() Dim Msg, Style, Title, Response Msg = "Did you want to save this document to word?" Style = vbYesNo + vbExclamation Title = "Save to Word?" Response = MsgBox(Msg, Style, Title) If Response = vbYes Then DoCmd.CancelEvent Else...
  9. L

    Tabbing through subforms

    This is the code I am using on the exit event in a control Forms![frmNewRecord]![frmNewSubRecord].Form![frmRecord/ProposalLink].Form![Code].SetFocus I want to tab through subforms. I have a main form - frmNewRecord Subform - frmnewsubrecord then on the subform I have 2 further subforms -...
  10. L

    Opening forms subject to criteria

    Thanks for the advice it worked!!:-))
  11. L

    VIEW AFTER SEARCH

    Not quite sure if this is what your getting at but here's what I did. I set up a click event in the primary key field which opened up a seperate form based on the table holding the data to display the data. Dim stDocName As String Dim stLinkCriteria As String stDocName = "Name of form"...
  12. L

    Opening forms subject to criteria

    The answer to this is probably staring me in the face! I have a main form which opens a subform through a cmd button. I would like the subform to open in datasheet view if it has any data and in normal view if there is no data. I've tried numerous differnet ways but A2K keeps chucking them...
  13. L

    Subform data dependant on particular Main Form

    I have 4 sub forms (frmPartC1, 2 etc) which basically hold the same data, all the fields are the same but default values are different depending upon which Main form opens the subform. Is there anyway I can write some code that would set a default value in the subform dependant upon which...
  14. L

    Null Values

    Thanks Mike and Robert for your replies I will try both ideas Regards Lorraine
  15. L

    Null Values

    Hi I have a form with five subforms. If the user tries to enter any data in the subform without having created a record in the main form the error "Index or Primary key can't contain a Null Value" appears. How can I set up a user friendly message to stop this from happening and sen the user...
  16. L

    Text Box

    Thanks again for the reply However I didnt make myself clear. I have a Dob field, an Age field and a datejoined field. The age field calculates fine with the code you gave me. however if I use the same code for the datejoined filed the result is always "junior" as the datejoined is always...
  17. L

    Text Box

    That code worked great but I have another problem now. I hope I can explain it correctly. On another form there is a DateJoined field. I need to display the status ie junior, adult, retired at the date joined. However this wont chane as they get older. I hope I've explained mysellf clearly...
  18. L

    Text Box

    Thanks R.Hicks It worked perfectly!!! Lorraine
  19. L

    Text Box

    Hopefully someone can help me with this small problem I have an unbound text box on a form. I want it to show either 'Junior', 'Adult' or 'Retired' depending on the dob of the client. I've tried different solutions but nothing seems to work properly. Any help woulr be appreciated Thanx in...
  20. L

    dim as database in 2000

    Hi I think I had the same problem as you a short time ago. I was informed by 'accesswatch' and 'JMARZ'. In the VBA window, select tools | References and check you have the Microsoft DAO 3.6 Object Library selected. Hope this helps Lorraine
Top Bottom