Search results

  1. I

    How to compare date in table with current date

    Im not getting an error message. Its this part of the code thats not working: Set db = CurrentDb Set saveTotal = db.OpenRecordset("SELECT * FROM tblEndofDayTotal WHERE MyDate = " & Date) Set endTotal = db.OpenRecordset("EndofDayTotal") If saveTotal.RecordCount = 0 Then txtTotal.Value =...
  2. I

    How to compare date in table with current date

    I wrote the code myself. This if my full code for the whole page: Dim db As Database Dim endTotal As DAO.Recordset Dim saveTotal As DAO.Recordset Dim strsql As String Private Sub Form_Load() Set db = CurrentDb Set saveTotal = db.OpenRecordset("SELECT * FROM tblEndofDayTotal WHERE MyDate =...
  3. I

    How to compare date in table with current date

    Any ideas? i really need some help urgently
  4. I

    How to compare date in table with current date

    Thanks for the reply. I've tried this and its nt working. This is my code: Set db = CurrentDb Set saveTotal = db.OpenRecordset("SELECT * FROM tblEndofDayTotal WHERE MyDate = " & Date) Set endTotal = db.OpenRecordset("EndofDayTotal") If saveTotal.RecordCount = 0 Then txtTotal.Value =...
  5. I

    How to compare date in table with current date

    Hi, im making a form which calculates the total of a till at the end of the day. Once this is saved i enter it in a database called 'tblEndofDayTotal'. What i want to do is: Ive got a button which links to this form. So when the button is pressed, I want it to check the tblEndofdayTotal...
  6. I

    Totalling records with same date

    Thanks for that mate.
  7. I

    Totalling records with same date

    Hello, Ive got an order table with a few fields one of them being 'Paid' and one being PaymentDate Paid is the amount someone has made a payment for PaymentDate is the date the payment was processed. Now what im trying to make is a End of Day Total page which will Sum up all the payments made...
  8. I

    How to remove a Chosen product from a Combo Box.

    Hello, I have a combo box on an order form which the user can purchase products. Now what i want to do is when the user chooses a product, and wants to buy more, when the drop down is clicked that same product they have bought should not appear in the drop down list. To do this, In my...
  9. I

    How do I show the last record entered from my database in a Bound Textfield?

    Thanks for your reply. Ive created a query on my Product Table. what do u mean by 'Set the TOP VALUES property of the query to 1'? And another thing i wanted to know was is there any other way to do it besides this? Like having some coding as ive shown above. That used to work but since ive...
  10. I

    How do I show the last record entered from my database in a Bound Textfield?

    Hello, I have a form with bound textfields. These used to show the last record that was entered in it by using: Forms!frmProduct.Recordset.FindFirst "ProductID = " & DMax("ProductID", "tblProduct") that code used to work and it used to show the last product in the databse. What...
  11. I

    Need Help urgent Please..

    Hello, Im making an order system with a multi log in user page. The owner and staff can log on. Atm ive got it working so that if a staff logs on it goes to their main menu and if the owner logs on it goes to the owner menu. To do this ive used the following code: Public Sub...
  12. I

    Need Help executing an update in form

    Anyone know whats wrong? Need urgent help..
  13. I

    Need Help executing an update in form

    Hello, Ive got a form where a customer can place an order. now at the bottom i want to put an execute statement which will look at the product ID that has been ordered and make sure that it dont allow that one to be entered again. This is the coding ive got atm to do that: db.Execute...
  14. I

    Need help inputting a Calendar for DOB in form.

    Atm ive got this code Dim selectedDate, date16 As Date 'get the date 16 years ago date16 = DateAdd("yyyy", -16, Now) 'get the date selected from the calendar selectedDate = txtDOB.Value ' MsgBox dte16 ' MsgBox datSelected ' date selected plus 16 years must be...
  15. I

    Need help inputting a Calendar for DOB in form.

    So what will this do? Because ive got a Form which i can add customers. So the DOB txtbox is in that form. The code uve given above wt will it do? Thanks for the help..
  16. I

    Need help inputting a Calendar for DOB in form.

    Ive got it working now so when I click it the date picker comes up. At the moment, it shows the current month in the current year. So if someone was born in for example 1980, it wouldnt be convienient for them to keep clicking back till they get to 1980's. Is there anyway i can get another...
  17. I

    Need help inputting a Calendar for DOB in form.

    Hello, Ive got a Date of Birth txtbox which if the user clicks it, it should pop up with a calendar that the user can then choose a date for the DOB. Now ive seen a few people say that you change the 'Show date Picker' to "For Dates". Now ive done this and the pop up calendar still dont...
  18. I

    Need help editing Database via Form

    Hello, Ive got a form with bound txt boxes that displays the information in the database. Now ive put an edit button which when its clicked it allow the txt boxes and combo boxes to be edited. Ive got the edits and so forth to work. This is the coding for my Save Button Private Sub...
  19. I

    Using autonumber in table and form

    No atm all i want is the productid incrementing whenever a product is entered which it does.. But i want it so it is always updated when a product is deleted so the id's are in order.
  20. I

    Using autonumber in table and form

    Hello, Ive got a product table with a ProductID which is an autonumber. As this increments itself - When a product is deleted that prodID disappears and it is not replaced so when a product is added it carries on with the autonumber. Example: Last ProductID used is 80. ProductID 80 is...
Back
Top Bottom