Search results

  1. B

    Default value fails

    Oops - problem solved. I had a rogue report that had faulty VB code attached. Now working. Thank you. Another question. Is there a way to populate some fields on a data entry form with data from the previous record saved.
  2. B

    Default value fails

    Tried this and get compile error - Invalid outside procedure Private Sub cboItem_AfterUpdate() Me.UnitCost = Me.cboItem.Column(6) End Sub Private Sub ItemCode_AfterUpdate() Me.ItemCode = Me.cboItem.Column(0) End Sub Option Compare Database DoCmd.Close acForm, Me.[Check Report] End Sub
  3. B

    Default value fails

    I have an item table with one field being UnitCost. I have a JobDetail table with one field being UnitCost. Both tables are linked by ItemCode. My data capture form shows fields from both tables. What I want is for the JobDetail.UnitCost field to have the Item.UnitCost field as its default...
  4. B

    Run-time error '3075' when using DoCmd.OpenForm in VBA

    Yes, and I could use DateFrom instead of Me.txtDateFrom in the If - more consistent coding I think. However still could not use Me.txtDate.. in stLinkCriteria string.
  5. B

    Run-time error '3075' when using DoCmd.OpenForm in VBA

    Yes I figured that out. Thats why I passed the Me.txt... items thru the call parameter list
  6. B

    Run-time error '3075' when using DoCmd.OpenForm in VBA

    Tried that but error could not find field. I will check my syntax again. However it is now working, so if it aint broke, don't fix it. Thanks for the input.
  7. B

    Run-time error '3075' when using DoCmd.OpenForm in VBA

    Me.txtDate... does not work in str...
  8. B

    Run-time error '3075' when using DoCmd.OpenForm in VBA

    Thanks again. Had the Query open/close in for debug purposes. Now removed.
  9. B

    Run-time error '3075' when using DoCmd.OpenForm in VBA

    Problem solved, but have no idea why. My structure for sales calling a sub was because I have many reports running of the Shop Sales Query, whereas the Purchase is only one report. However changing the Purchase to call a sub as for Sales has worked. Still can't see why the original code did not...
  10. B

    Run-time error '3075' when using DoCmd.OpenForm in VBA

    Still no joy. 3075 still comes up. tried PurchDate, WHPurchase.PurchDate, [PurchDate], [WHPurchase.PurchDate]. Adding Me. to the date fields brings up compile error. Yes PurchDate is a Date field in WHPurchase table I have a similar situation reporting from a different table. The code below...
  11. B

    Run-time error '3075' when using DoCmd.OpenForm in VBA

    Re: Run-time error '3075' when using DoCmd.OpenReport in VBA I cannot see why this is giving me a 3075 error. I have exactly the same code with a different date field - works fine. I am obviously staring at it but not seeing it. The form's record source is bound to the Purchase Query and the...
  12. B

    New to Access

    Thanks for all your input. Need to get my head around a different 'philosophical' approach and put my learning cap back on.
  13. B

    New to Access

    By the way I still think it would be far more sensible and user friendly to handle all the calculations at the form input side and update the table with the final calculated values. Seems like an oversight to me and I cannot see this causing any normalisation problems.
  14. B

    New to Access

    Thanks for the advice. I would be happy to use the calculated field datatype, however it is limited on the functions one can use and my calculation requirements are not supported. Your second option is interesting but how do you limit the query calculation to apply only to a new record being...
  15. B

    New to Access

    I am now in my 10th day of learning and using Access - on a very steep learning curve. There are many fine aspects to Access but there are some unfriendly or somewhat obscure user interfaces. The one that I find strangely annoying is the inability to define a calculation for an input form field...
  16. B

    New to Access

    Hi All. My name is Buster and for my sins I have had to learn access basics rapidly as we are moving databases from the creaking old Paradox to access.I have done all the basic stuff, created necessary tables, relationships and data entry forms and still using Crystal Reports as it looks easier...
Top Bottom