Search results

  1. R

    setting default value for all records in textbox

    Good news is the 0's that are coming up in the form are good enough for the math if I can get it to run at the right time for all the child records. If I put the math code in the "OnClick" event of the "BarsRemaining" it will do the math once I click on the textbox for the record and click off...
  2. R

    setting default value for all records in textbox

    I added the requery function but it doesn't do anything. This is what I have. I have a requery in the code but it doesn't appear to help any. I tried requery the main form and the subform the numbers are on. The requery is right after the execute. When the form opens the table does update with...
  3. R

    setting default value for all records in textbox

    I should have mentioned the math for "BarsSold" is located in the "AfterUpdate" event on the "BarsReturned" textbox. When "BarsReturned" gets changed the math gets triggered. Obviously when the code is run and 0 gets inserted in "BarsReturned" access isn't seeing this as an update even though...
  4. R

    setting default value for all records in textbox

    I was reading on the CurrentDb.Execute function and found some code I changed for my form and it kinda works. This is the code, its on the main form "onload" event. I tried other events but all the same results. Private Sub Form_Load() Dim strBarsReturned As String Dim OrderID As Long Dim...
  5. R

    setting default value for all records in textbox

    Exactly, the parent, which is the order, and the children are the order details (inventory, how I got the bad name. :) ) All the children need to change, at any given time when this form is opened there will only be one parent record in the subform. There will always be many children for that...
  6. R

    setting default value for all records in textbox

    On this one I get error 3061, too few parameters, expected 2. I looked up the error and it sounds like its not finding the field BarsReturned. I've tried a few strings in that line but same error pops up. This code was put in the "On Current" Event in the main form. Private Sub form_current()...
  7. R

    setting default value for all records in textbox

    I've been playing with your code to try and make something else work on that form but can't get it going, maybe because I'm trying something slightly different. As I mentioned I now have it so when the form opens the textbox "BarsReturned" is blank, nothing in it. What I want to happen is when...
  8. R

    setting default value for all records in textbox

    thanks for that I maybe able to use it later. I went with a different approach on this one. I have it now so when the form opens BarsReturned is empty, no number at all, and a person can't post the count until all fields are filled. This works better in the big picture. Thanks for the help
  9. R

    setting default value for all records in textbox

    I just tried that but it has the same effect as the onfocus event. You need to select the record before it changes the number, I need it to change onload.
  10. R

    setting default value for all records in textbox

    I have a form that has 3 subforms, in one subform I have a textbox called "BarsGiven" in another subform I have a textbox "BarsReturned". When you open the form there are 10-20 records that show up and each record has a number in the "BarsGiven" textbox. In the "BarsReturned" textbox it has a 0...
  11. R

    selecting same record in 2nd subform

    Holy cow, I actually got it working. :) :) Here's what did it. Private Sub Form_Current() With Forms!NightCount!NightCountInventorySubform.Form.Recordset .FindFirst "InventoryID = " & Forms!NightCount!NightCountEnterReturnsSubform.Form.InventoryID If .NoMatch Then MsgBox "Record ID " &...
  12. R

    selecting same record in 2nd subform

    If I use the following code on the outlined subform I can't select a record in the outlined subform unless that record is selected in the first subform. But when I select a record in the first subfrom the outlined subform doesn't follow automatically. Once I click on that record in the outlined...
  13. R

    selecting same record in 2nd subform

    I've been reading about the following properties Form.RecordsetClone Property Form.Bookmark Property Recordset.Bookmark Property But its all very confusing, which one do I use and where?
  14. R

    selecting same record in 2nd subform

    I'm trying the following but it says there's an invalid method in an expression. Private Sub Form_Current() Dim id_d1 As Long id_d1 = Me.InventoryID Forms!NightCount.NightCountInventorySubform.Form.SetFocus DoCmd.FindRecord id_d1 End Sub
  15. R

    form closing changes field in all records in table

    Thanks, I read on a post to change that setting it didn't mention it would do that for everything, code much better and works. :) Could you take a peak at my other thread, no one seems to know. http://www.access-programmers.co.uk/forums/showthread.php?t=212838
  16. R

    form closing changes field in all records in table

    I found a setting in the options that turns off prompting for update queries, I'm all set. Thanks for your help!
  17. R

    form closing changes field in all records in table

    That's awesome it works, thank-you! But, always a but hey. :) When I close the form it pops a stupid window asking me if I want to do it, I don't need that screen, I always want it to do it. Can it be told so it doesn't need to ask?
  18. R

    form closing changes field in all records in table

    Thanks! I'll give that a try
  19. R

    form closing changes field in all records in table

    Is this possible? I have a table with product in it and added a yes/no field. On a form I have a combo box that points to that table for all the product. I've made it so when I select an item in the combo box that field will turn to yes and then the next record it won't show up there because...
  20. R

    selecting same record in 2nd subform

    Hi, I have a form with 3 subforms on it, One subform is for orders, the other 2 subforms show order details. The 2 bottom subforms need to always be on the same record at the same time. If someone selects a record in the outlined subform that record also gets selected in the subform beside it...
Back
Top Bottom