|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello
Where do I go for help with Access97/VB? Ta |
|
#2
|
||||
|
||||
|
Possibly the 'general databse forum'... what's the problem anyway?
|
|
#3
|
|||
|
|||
|
You shouldn't have asked that...
I am updating an Access97 database for a funeral directors.
They have a new entry page to book in a new funeral appointment. On this page, they currently enter the date/time and the vehicle to be used. What they would like now is a visual display of when each vehicle is booked out and for how long. This is because other users are dialling in from other branches and the search facility is SLOW. They want the visual bit to be updated as soon as they exit an edit box. I am approaching this as a Delphi programmer so I don't have a clue where to start!!!!!!! |
|
#4
|
||||
|
||||
|
If it's going to be updated immediately after you edit a textbox then you go into the forms designer, set the focus onto the textbox, right click the text box and select properties. Select 'Events' and select 'after update.'
This will bring a box labelled '...' into play. Click that and select 'Code Builder' and this will show you the familiar code creator. You could possibly have got this far. Then you can use some SQL to do your updates. The code goes like: Dim db As Database, rs As Recordset Dim sql as text Set db = CurrentDb sql = "SELECT THIS FROM MY TABLE" Set rs = db.OpenRecordset(sql) Do While Not rs.EOF ... rs.MoveNext Loop |
|
#5
|
|||
|
|||
|
OK - that look reasonable for instant updating, but what I'm not so sure about, is how to set up the graphical display.
Should I use a series of rectangles, or is there a way to generate a day full of half hour slots for each vehicle? I don't want to have to update the system every time they add or lose a vehicle from their fleet. I would have been able to cope with this fairly easily in Delphi, but I am completely new to VB so it is a little bit confusing at the mo. |
|
#6
|
||||
|
||||
|
I think there's a chart wizard, but off hand I don't know how that works.
For your chart. The best way I could think of would be to create a subform, then have a number of textboxes on the subform to act as hourly slots. This subform would be repeated for each vehicle. If the vehicle is booked then set the color of the textbox to red, and white if it isn't. It's getting a bit technical there, but that's the best way I could think of. |
|
#7
|
|||
|
|||
|
thanks - that gets me started at least!
I may be back ![]() |
|
#8
|
|||
|
|||
|
I have decided to use an array of list boxes.
Can anyone tell me howto set the back color of an individual row in a list box column? Thanks |
|
#9
|
||||
|
||||
|
It should simply be:
list[number].backcolor = something don't know what the something is though. |
|
#10
|
|||
|
|||
|
I tried that...
Private Sub CheckBox_Click() If CheckBox.Value = 0 Then List[2].ForeColor = white List[2].BackColor = black Else List[2].ForeColor = black List[2].BackColor = white End If End Sub get an error...Invalid use of property |
|
#11
|
||||
|
||||
|
I found out it should be something like:
me![listbox].backcolor = rgb(0,0,255) for blue... but it didn't work.. |
|
#12
|
|||
|
|||
|
Private Sub checkbox_Click()
Dim I As Long For I = 0 To list1.ListCount - 1 If checkbox.Value = 0 Then tried both of these list1.Column(0, [I]).ForeColor = RGB(0, 0, 0) list1.ItemsSelected.Item [I].ForeColor = RGB(0, 0, 0) I can't access the individual row of the list Else list1.ForeColor = RGB(255, 255, 255) list1.BackColor = RGB(0, 0, 0) End If Next I End Sub |
|
#13
|
||||
|
||||
|
No success? maybe it just won't work with list boxes. You never know.
|
![]() |
| Viewing: Dev Shed Forums > Other > Dev Shed Lounge > Tell me where to go... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|