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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by pjm

  1. pjm

    DoComd.Echo does not work in Access 2007

    docmd.setwarnings false pjm
  2. pjm

    Counting UNIQUE or DISTINCT numbers in Access

    Not recommended to use reserved words as column names: "Date", "Order". You could try enclosing them in square brackets [Date], [Order], but best to change the underlying table definition. Access (I only have 2003 so don't know about newer versions) doesn't support "count distinct" so you...
  3. pjm

    Dropdown false

    Yes. A new record will not appear in any query unless it is saved. pjm
  4. pjm

    Dropdown false

    You must commit the new record in the other form before you requery the combobox1 otherwise it doesn't yet exist in the underlying data set! pjm
  5. pjm

    Dropdown false

    Hard to say without more details, but if you are adding records to the data set underlying your combobox rowsource then yes, you will need to requery the combobox to see any additions that you have saved:- me.combobox1.requery HTH pjm
  6. pjm

    Dropdown false

    Hi, The dropdown method does not have any additional parameters. It causes the combo box to display the list of values just as though you had clicked on the down-arrow next to it. I would put the following code in the AfterUpdate event of comboxbox1:- me.combobox2.enabled = not...
  7. pjm

    How to make form show user empty new record

    Set the "Data Entry" property of the form to "Yes". HTH pjm
  8. pjm

    INSERT statement conflicted with the FOREIGN KEY constraint

    Master/Child properties are on the Data tab of the Subform's properties. You won't get the autocomplete options when using the ! operator, but you need to include the forms collection in the reference: forms![frmmainform]!tractname.value. I'm getting it all wrong today. Take my advice & listen...
  9. pjm

    INSERT statement conflicted with the FOREIGN KEY constraint

    My apologies, I missed that. Lost500 - follow Duane's advice and use the Master/Child link fields and Access will do it all for you. pjm
  10. pjm

    INSERT statement conflicted with the FOREIGN KEY constraint

    In the subform's before update event - something like this me.tractname.value = frmmainform!tractname.value If this doesn't work, step through the code and post the exact code line and the error message you get... pjm
  11. pjm

    INSERT statement conflicted with the FOREIGN KEY constraint

    That's correct. You have a constraint: you can't add a record to the child table unless the TractName column exists in the parent table. You would generally need to relate the child record to the parent anyway, even if you had no constraints. Use your form's before update event to set the...
  12. pjm

    INSERT statement conflicted with the FOREIGN KEY constraint

    Believe you are not populating the FK in the new child record before trying to commit it. The "Before Update" event is usually a good place to do this. HTH pjm
  13. pjm

    Dirty Property to Undo Last Action

    Unfortunately, that is the crux of the issue. Undo does not mean "undo the changes I have made to rows in the database". It means "undo the changes that I have not yet committed" - very different. And as TheAceMan1 says, once you have moved off a record the changes are committed and your...
  14. pjm

    Dirty Property to Undo Last Action

    Undo is like "rollback" as opposed to "commit". It "undoes" a pending transaction rather than reversing a transaction already committed. If you have changed data in one subform and then move to another subform the data in the first subform is committed and cannot be "undone". If you are...
  15. pjm

    Joining or Combining Two Tables

    select t1ranked.person, t1ranked.intday, t2ranked.[+day], t2ranked.[-day] from (SELECT 1+(select count (*) from table1 as t1 where t1.person = table1.person and t1.intday<table1.intday) AS t1Rank, Table1.Person, Table1.Intday FROM Table1) as t1ranked, (SELECT 1+(select count(*) from table2 as...

Part and Inventory Search

Back
Top