Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. AccessAddict

    closing form on exit!

    Hi To avoid mis-spelt form names, the easiest way to close a current form is Docmd.close acForm, Me.Name HTH Alan
  2. AccessAddict

    How to use a button to pass information

    Hi Use the On Click event of your Command Button. DoCmd.OpenForm "YourNewFormNameHere",,,"[IDNo] = " & Me.txtYourRecordIDFieldHere IDNo is the unique record number (Primary Key) of the record you want to open, and Me.txtYourRecordIDFieldHere is the field on your form that contains that...
  3. AccessAddict

    ActiveX Grid Control

    Hi Sorry, I can't find how to attach a file.......... Alan
  4. AccessAddict

    ActiveX Grid Control

    Hi Does anyone know of a grid control (ActiveX) that can be used on a form that will enable drag and drop between cells and update the underlying data? Basically it is to implement in a small guest house booking system (developed in A2002). The x-axis of the grid will be dates (which will need...
  5. AccessAddict

    Add Record to table 1 shot

    Hi You could do it by opening a recordset........ Dim db As DAO.DataBase Dim rs As DAO.RecordSet Set db = CurrentDB() Set rs = db.OpenRecordSet("YourTableName") rs.AddNew rs("FirstName") = Me.FName rs("LastName") = Me.LName etc.......... rs.UpDate Set db = Nothing Set rs = Nothing HTH
  6. AccessAddict

    db grid ocx

    Hi Has anyone any experience of or used grid32.ocx (which I believe is for DAO recordsets) or msdatgrd.ocx (which is for ADO recordsets)? I can find info on using the controls via VB or C++ but not for implementing/using them in Access with VBA, or even registering either of them in Access. I...
  7. AccessAddict

    DCount syntax headache

    Hi Bill Oooops, my apologies. I didn't notice a different poster, but many thanks for your solution to my latest headache - and also for your post Jim. Without help from people such as yourselves there would be a lot of non functioning db's!! Thanks again Alan
  8. AccessAddict

    DCount syntax headache

    Hi Jim That did the trick. Thanks a million Cheers Alan
  9. AccessAddict

    DCount syntax headache

    Hi Jim Thanks for the reply. Still getting the type mismatch error even dropping the single quotes (MyInt is an integer) If DCount(&quot;*&quot;, &quot;tblMemos&quot;, &quot;[NoteDate] < Date() - &quot; & Myint & &quot;&quot; _ And IsNull(&quot;[ActionNotes]&quot;)) > 0 Then Any other ideas...
  10. AccessAddict

    DCount syntax headache

    Hi Could someone please have a look at the following for me If DCount(&quot;*&quot;, &quot;tblMemos&quot;, &quot;[NoteDate] < Date() - '&quot; & Myint & &quot;'&quot; AND IsNull &quot;[(ActionNotes]&quot;) = 0 Then etc Basically I just want to check if [NoteDate] is less than two days...
  11. AccessAddict

    Deleting all but one of duplicate records

    Hi All I've been trying to use the code supplied by Rolliee (in my case it doesn't matter whether it's the earliest or latest record thats retained) but up till now haven't managed to get it to work (type mismatch errors etc particularly the line okay = okay & (rs.fields(i) = ar(i))) although...
  12. AccessAddict

    Deleting all but one of duplicate records

    Hi Many thanks for the replies and pointing me in the right direction. I would never have thought of using an array Cheers Alan
  13. AccessAddict

    Deleting all but one of duplicate records

    Hi I've just looked at a db built by a family friend, and discovered many duplicate entries in a table (amongst other things lol). I've created a Find Duplicate query and then a delete query based on the Find Duplicate query, but that will obviously delete ALL occurences of the duplicate data...
  14. AccessAddict

    Stop MS Error message

    Hi Hasu Thanks for the reply. Will work on it tomorrow, my eyes are rapidly cosing right now and I need sleep!! Thanks for your time and help Cheers Alan
  15. AccessAddict

    Stop MS Error message

    Hi Thanks for the reply. Your code stops the MS error message fine, but on clicking 'Yes' on the message box the form now closes instead of going back to the open form to input the missing data. Any thoughts? Thanks for your time Alan
  16. AccessAddict

    Stop MS Error message

    Hi I have the following code attached to the Before Update event of a form which loops through all the forms controls and prompts the user for data entry or not for any required fields (any fields for the code to 'skip over' are in the If ctl.Name = etc section): Private Sub...
  17. AccessAddict

    Open form2 with button and populate field in with field in form1

    Hi Have you tried exporting all the already input data on the various controls on Form1 to public variables when clicking any of your command buttons and then re-importing the data back to the relevant fields on any forms your command buttons open? You'll need to create the public variables in...
  18. AccessAddict

    Strange results with DCount

    Hi That solved the problem. Many thanks - I'd have never thought of that in a million years but will be very aware of it in future. So much to learn and so little time........... :) Thanks again Alan
  19. AccessAddict

    Strange results with DCount

    Hi I'm using a DCount function to check if a selected date in a combo box and ID number in a text field (both controls on the same subform) combination already exists in the underlying table, code of which is Private Sub cboDateCom_BeforeUpdate(Cancel As Integer) 'make sure date has not...
  20. AccessAddict

    Query/subquery a junction table

    Hi Thanks for your reply. I've given up on the aspirins - it's 24 hours later and still getting nowhere am thinking of valium or prozac!! I think I'm missing something really stupid here. tbl1 and tbl2 are related as 1-M to tbl3, meaning tbl3 is the junction table of a M-M relationship. If I...

Part and Inventory Search

Back
Top