Search results

  1. I

    Help with SQL code

    I've doing a hotel d/b and want to prevent double room booking, below is my code, but it doesn't show the correct data when Rooms Available is run...Can you help. Ian Rooms Available SELECT [Rooms].[RoomNum] FROM Rooms LEFT JOIN [Rooms Reserved] ON [Rooms].[RoomNum]=[Rooms Reserved].[Room]...
  2. I

    Prvent double booking a room

    Hi, Long time since I've been on here, not much database work being done....anyhow here goes. I'm designing a small d/b that would allow 4 rooms to be booked out, by date (not time) and I want to prevent double bookings. I've woked out the sort of furmula, but am not sure if it is 100%...
  3. I

    Conversion from 1997 to 2000

    It is also best to compile the d/b. Open any part of the vb code in 97 and then (from memory now!!) choose compile and debug...this will route out any bad code that isn't neeed...you need to delete that code. Now you should be ok Ian
  4. I

    Form design HELP

    Hi all, my first time using the new layout - quite snappy! Anyhow it has been a while since I did a d/b project and need a bit of help. I have a menu page with command buttons on the left hand side, when one is clicked (say A) I want the right hand side to display the A menu section with...
  5. I

    Subform and calculation HELP

    I'm still having a nightmare.... Private Sub numbeoftickets_AfterUpdate() 'Check if that number of tickets available' If Forms![Frmbookflight]![Numberofseats] < Me.numbeoftickets Then MsgBox "That number of tickets are not available" '**Would also like to get a setfocus on numberofticets here...
  6. I

    Subform and calculation HELP

    I still get errors! This is what each form/sub is called minus the []: Main form called [Frmbookflight] Numberofseats (field) Subform 1 called [Passenger subform] Numbeoftickets (field) Ian
  7. I

    Subform and calculation HELP

    My database is a flight booking system (USING Access2000): I have a form that has 2 subforms the form displays the flight data along with 1 subform for the main passenger, address, numberoftickets (required) and total cost the other subform is for any additional passengers travelling with main...
  8. I

    Calendar date verification

    I have a calendar on my form, yet I want to ensure no date before todays date is entered. How is the best way to ensure the date is correct? =>date() doesn't seem to work, do I need some code in onopdate or on current? Ian
  9. I

    Alert text

    It isn't a continuous form. And it is a bound tick box [This message has been edited by ian_ok (edited 12-01-2001).]
  10. I

    Alert text

    Sorry.....I think I'm going round in circles here. The form has 1200 records and if I move from 1 to the next it doesn't work. I think all these if then true/false etc is sending me mad. The alert text is for adding info if the person in the record has some points to remind users Ian [This...
  11. I

    Alert text

    This is what have and it doesn't work if I move from one record to the next. Private Sub Alert_AfterUpdate() If Me.Alert = -1 Then Me.altext.Visible = True Else Me.altext.Visible = False End If End Sub AND Private Sub Form_Current() Me.altext.Visible = False End Sub
  12. I

    Alert text

    I wish to add an alert text to a form I have. I'm unsure how best to set this up. What I was thinking of is to have a yes/no tick box, if ticked yes then alert text appears and you add in the data. The alert text memo would be visible if yes ticked otherwise it wouldn't show. At the moment I...
  13. I

    Subform query

    I've searched through previous subform questions, but not found what I want, so here goes. I want to restict a subform to a certain number of entries depending on a number input: mainpassenger wants 3 flight tickets, so then we have 2 entries required in subform for friendpassenger(s) If you...
  14. I

    Validate code..where

    Have sorted it now, I think it was because the close button I have is a pop up menu (different form) and wasn't looking at the right form. Thanks once again. Ian
  15. I

    Validate code..where

    Thank you jwindon, tho code is fantastic. Just one question, does the code just work on a certain amount of fields with validate within the tag. The reason for asking this, is that I tried in my current d/b and I got a runtime error saying something like the control number I specified is...
  16. I

    Validate code..where

    I have got this code from a previous posting, but am unsure where to place it on my form? Ian Dim currctl As Integer, numctls As Integer Dim ctl As Control numctls = Forms!frmMaterials.Count 'counts the number of controls on form...
  17. I

    calendar help

    Thanks for that Jack...I have got it working and found out I needed the code below which you add through the bulid event (with a right click), no wonder I couldn't find it in the properties!! Sub ctlCalendar_Click() DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 End Sub
  18. I

    calendar help

    I placed a calendar control on my form yet the field it should update will only update if I click on calendar date I want then click back in the field it should go in. This isn't right is it. Any help. thank you Ian
  19. I

    form design

    Set THE OTHER FIELD to not enabled in properties first then add this code to the one they will first enter data into. Private Sub YOURFIELD_Change() If Not IsNull(Me.YOURFIELD) Then Me.THE OTHER FIELD.Enabled = False Else Me.THE OTHER FIELD.Enabled = True End If End Sub Ian
  20. I

    views

    Try this Tools....Start up, then untick the boxes. From testing this last week, it only works on the pc that you change the settings for, sorry don't know any code to change for a networked d/b. Warning note: If you then want to get the menu back at a later date you can do this via F1 for...
Back
Top Bottom