Recent content by StanJx

  1. S

    Run For Loop Even If Form Is Closed

    Hi Doc Thanks for your reply. In the reply I sent you previously I attached the code on my entire timer event on the form frmAssign (The filtered form which the for loop needs to be run on). So in the scenario I am transferring the timer code to the login form how would I structure and amend the...
  2. S

    Run For Loop Even If Form Is Closed

    DOC MAN, Thanks for your reply. I have a form that is open and stays hidden. Is it possible to run this from that form. Even if it's a login form.. What is the best method? A form or a macro.. I have not worked with macro's that much. Here is my for loop code. It runs on the timer event...
  3. S

    Run For Loop Even If Form Is Closed

    Hi, I have a filtered form called frmAssing on which I have implemented a for loop to check and enter some values. So far this is working when the form is open. Is there a way i can get this function to work when that form is closed. Would appreciate if someone can provide the code required for...
  4. S

    Update List Box Automatically

    Hi, I have a unbound form with 2 list boxes lstReq (reqdate,reqtime,vehiNO,vehistatus) & lstVehi(vehiNO,vehiavail). I need to update lstVehi(vehiavail=false) automatically (Maybe on timer event) according to the data in lstReq according to certain...
  5. S

    DCount Multiple Criteria

    Hi, I know this is an old thread but I hope someone will post an answer to my query. I have a table tblRequest where I have 3 fields RequiredDate VehicleNo & TeamSplit. I need to get a count in my forms code of to the selected RequiredDate and selected VehicleNo how much is the count of...
  6. S

    Stop Warning When Sending Email From Access

    Hi I am trying to send an email using the below code via button of my access form. But I am receiving a warning message I have to allow every time I am sending an email. Any idea how to stop that message? :banghead::banghead::banghead: Would appreciate if you could post up the modified code...
  7. S

    Filter Or Populate List Box According to Two Date Fields

    Hi, This maybe something simple but I couldn't figure it out yet . I have a list box with two date columns (EntryDate & RequestedDate). I need the list box to show records according to both dates. For Example Entry 1 EntryDate 9/12/2016 RequestedDate 9/13/2016 Entry 2 EntryDate 9/13/2016...
  8. S

    Update Two Recods In Same Table

    Hi, was able to get this working. Can't believe it was such a simple thing :banghead::banghead::banghead::banghead::banghead::banghead:. One was the string. And the other was the fact that I had miss spelled DrvID as DvrID and next was the fact that I was trying to pass a string value to a...
  9. S

    Update Two Recods In Same Table

    Now I am receiving Too few Parameters Expected 1 :banghead::banghead::banghead:
  10. S

    Update Two Recods In Same Table

    I tried this out but I am still getting that error. Here's the debug print result. It seems fine. The value is of the old Vehicle No.:banghead::confused: UPDATE tblVehicle SET vehiAvailable = -1 WHERE DvrID= PA-9788 ;
  11. S

    Update Two Recods In Same Table

    Are you asking me to run the code like this? UPDATE tblVehicle SET vehiAvailable = -1 WHERE DvrID Or with values?
  12. S

    Update Two Recods In Same Table

    I tried it out but I am still getting the "Too Few Parameters. Expected 2" 3061 Error. The TempVars Value seems to be fine. Any other method to get this done. I need to update two boolean records in the same table at the click of a button. One to a old record. and one according to the new...
  13. S

    Update Two Recods In Same Table

    Just realized a small mistake on the code I posted. Here's the correct post. CurrentDb.Execute "UPDATE tblVehicle SET vehiAvailable = True WHERE DvrID= " & TempVars!TempAssign CurrentDb.Execute "UPDATE tblVehicle SET vehiAvailable = False WHERE DrvID= " & Me.cmbVehicle I used the debug.print...
  14. S

    Update Two Recods In Same Table

    Hi Minty, Thanks for your response. I think the issue is the WHERE statement because the value is taken from the same field. I used TempVars to store that value temporarily from a textbox that is populated on a list click. Like you suggested I changed the structure to have only one Yes/No...
  15. S

    Update Two Recods In Same Table

    I need to update two records of the same table (tblVehicle) during a button (cmdAssign) click. The record is selected from a list box and at the button click the currently assigned vehicle's info (vehiIn = True , vehiOut = False [Where = vehicleNo{Current}]) needs to be updated. And...
Top Bottom