Search results

  1. A

    Else without If error

    When I enter text into my 'toe' string field, I get an error Private Sub toe_AfterUpdate() Dim toe As String Dim ee As Boolean Dim kip As String Dim kip1 As String If toe = "Play Group" Or "Guides & Brownies" Or "Cub Scouts" Or "Women's Institute" Or "Line Dancing"...
  2. A

    RemoveItem

    The AddItem seems to work fine, but RemoveItem doesn't, yet I've used precisely the same syntax except for 'RemoveItem' MsgBox "Booking cancelled!", vbInformation, "Booking Cancellation" If Month(Me.Date_1) = 1 Then ListJ.RemoveItem Me.BoI ElseIf Month(Me.Date_1) =...
  3. A

    AfterUpdate Msgbox...

    I have a field on my form which I want to display a message box when something is entered. Private Sub BoI_AfterUpdate() Box = Msgbox("Is the booking date at least 7 days before the hiring and no more than 8 weeks in advance? If so, click Yes, otherwise, click No. You can check the calender on...
  4. A

    Add to table

    Hello everyone. I have a form based on one of my tables. When I fill out the fields on the form the data automatically goes into the table. How can I make it so I click a button which adds all the data to the table? I don't want the data to go into the table as I type it on the form, I want to...
  5. A

    Multiple queries in one report

    Simple question. How do I put 4 queries into one report? I need to display usage statistics for each week of February into one report. Thanks in advance. :D
  6. A

    Date properties

    How could I implement a feature which determines if something is at least 7 days before a booking at a theatre, but no more than 2 months. For example, something like... If =Now() - 7 Then... Elseif =Now() Then... I don't really know how to go about it. Hirer Date is when the booking is to be...
  7. A

    Query percentages

    Hey guys. I have a boolean expression which I want to calculate the percentage of. I have the field 'Regular Booking' which is either true or false. I have 6 true and 5 false, equalling to 11 in total. I've tried using: 100*[CountOfRegular Booking] / [TotalRegular Booking] but this gives me the...
  8. A

    Start and end date

    How would you make two prompt boxes which ask for the start and end date so you can select all the data between the two dates... [Start Date?] And [End Date?] E.g., 01/01/2006 And 07/01/2006 So I can select all the data between that week. I also need to use this for the remaining weeks in...
  9. A

    Add and remove items

    I finally got my add item feature going. I have a list of bookings for both January and February. Just for reference, 'BoI' is the name of the field which I want to add or remove. My code looks like this: If Month(Me.Date_1) = 1 Then ListJ.AddItem Me.BoI ElseIf Month(Me.Date_1) = 2 Then...
  10. A

    Undefined function 'format'

    Percentage: Format(CountOfRegular Booking/DCount("*","tblBooking"),"Percent") I get an error: 'Undefined function 'Format'' - how can I fix this? The above expression is supposed to convert values into percentages. I copied the expression from someone's sample database (to help me) and I just...
  11. A

    Percentages

    Simple question: how do you convert vlaues into percentages? I have a boolean expression so when it's ticked the bookings are regular, and if they're false they are occasional bookings. I have used 10 bookings as test data (5 regular - true, 5 occasional - false). How would I convert these into...
  12. A

    Adding Items...

    I've made a button on my form which adds a booking ID into the listbox, but it doesn't seem to work. This is my code: Private Sub Command18_Click() Dim BoI As String MsgBox "Booking successfully added!", vbInformation, "Booking" If Month(Me.Date_1) = 1 Then ListJ.AddItem Me.BoI...
  13. A

    Criteria for drop-downs

    In my query I want to find the total number of "occasional" bookings. There are two types: occasional and regular. However, when I select the tblBooking and the field it finds the total number of all the bookings, which is 10 (5 reg. and 5 occ.). However, I only want to find the occasional (5)...
  14. A

    Usage help please...

    How do you calculate usage? For example... If I've got a field named Time, then a drop-down box with "Morning", "Afternoon" and "Evening" How do I make a query so it displays the number of each time... For example... There's two times for Morning, three for afternoon and one for evening. I...
  15. A

    Booking too far in advance or too close

    Hello everyone, if anybody could help me I'd deeply appreciate it. Booking ID = the time when it is booked over the phone Hiring ID = the time when the event is to be held Basically I have to make some booking dates, and use January and February 2006 as test data. My only dilemma is it says...
  16. A

    Adding items...

    MsgBox "Booking successfully added!", vbInformation 'Depending on which month is booked, will determine which listbox is goes in on frmMain If Month(Me.Date_1) = 1 Then Forms!frmCurrentBookings!ListJ.AddItem = Me.BoI 'Add to ListJ on frmCurrentBookings ElseIf Month(Me.Date_1) = 2...
  17. A

    Date help...

    In Access, I'm trying to make it so whenever I type a date into the form, it will add it to the listbox in another form. However, I have two listboxes for January and February. Something like... If date_1 is between 01/01/06 and 31/01/06 Then add this to listboxJ in the other form If date_1...
  18. A

    Ideas...

    Hello people, I wasn't sure where to post this but this section seems appropriate. I apologise in advance if it's in the wrong place! :( I have an AS Computing project to do, and I'm just requesting some ideas of how to go about things. :) The main bulk of the database is complete. Basically...
  19. A

    This is probably really simple!

    Hey guys, I'm just wondering how I could limit a field to using from 2 - 20 letters. If I placed the letter "a", I'd get an error saying how at least 2 letters must be there, and a maximum of 20. How would I do this? Lastly, how can I make it so when I enter data into a form, I can click a...
Back
Top Bottom