473,322 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Unbound check and text box's on a continuous forms

121 100+
Hi,

I have a continuous form with check boxes and text boxes that I need to be unbound.

I want to apply formatting to the text boxes and check boxes on the individual records in the continuous form i understand that this is not possible unless the controls are bound to a field in a table.

I have found an example database written by Albert Kallal at the following link that allows you to use a unbound check box on individual records on a continuous form.


(Multi Select Example)

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html


Which is great and I have got this working in my form.

the form is designed to be an equipment booking form so the idea is I have a list of equipment which the user is able to book to a date and time.

I am trying to display when a piece of equipment is booked by changing the colour of the text boxes which represent time slots throughout 09:00 - 00:00 so green if the equipment is available and red if not.

I am hoping that the above example can be manipulated to enable me to change the colour of the text boxes I must admit that I do not fully understand how the checkbox example works and have tried several times to apply the colour changes to a text box without success

The code that makes it work is as follows

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Dim colCheckBox      As New Collection
  5.  
  6.  
  7. Public Function IsChecked(vID As Variant) As Boolean
  8.  
  9.    Dim lngID      As Long
  10.  
  11.    IsChecked = False
  12.  
  13.    On Error GoTo exit1
  14.  
  15.    lngID = colCheckBox(CStr(vID))
  16.    If lngID <> 0 Then
  17.       IsChecked = True
  18.    End If
  19.  
  20. exit1:
  21.  
  22. End Function
  23.  
  24.  
  25. Private Sub Command13_Click()
  26. Debug.Print "contact = " & Me.ContactID
  27.  
  28.    If IsChecked(Me.ContactID) = False Then
  29.       colCheckBox.Add CLng(Me.ContactID), CStr(Me.ContactID)
  30.    Else
  31.       colCheckBox.Remove (CStr(Me.ContactID))
  32.    End If
  33.    Me.Check11.Requery
  34.  
  35. End Sub
  36.  
I hope I am making at least some sense if you download the database and take a look it will become clearer


Any help is much appreciated

Regards Phill
Mar 2 '10 #1
0 1907

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Simon P | last post by:
Hello group, I'm in desperate need of help. Here goes : I have the following tables : CONTACTS (ContactID, FirstName, LastName, Company, etc.), SHOWS (ShowID, ShowDescription) and SHOWDETAILS...
2
by: Todd | last post by:
Hello, I'm curious if anyone knows of a way (if one exists) to tell a form (in Access 2002 VBA) to sort on an unbound column of a combo box on the form. Here's what I want to do: A combo box...
2
by: Todd | last post by:
Hi. I want to sort the records on my form (using either a continuous form or a datasheet) by the unbound "description" column in a combo box on the form (or in the datasheet.) Here's a rough...
4
by: Bill Stock | last post by:
The few times in the past that I've loaded unbound data, I've tended to cheat and use temp tables (not really unbound) or use code for small datasets. I'm currently involved in a project that...
20
by: Robert | last post by:
Need some help to stop me going around in circles on this one.... Have a nested subform (subform2) which simulates a continuous form for the record on the parent subform. Subform2 has rows of...
5
by: SBC News Groups | last post by:
Using VBA how do I assign columns from a table to controls on an unbound form? Mike
4
by: Susan Bricker | last post by:
I have a form that displays record information in Continuous Record display (scrollable list). One of the fields in the record is an Integer value called "rcode" (reason code). But, I don't want...
6
kcdoell
by: kcdoell | last post by:
Hello: I three fields on a continuous form: , & On the same form I have an unbound text box with the following formula in the control source: =Sum(IIf(=50,,0)) This worked great.
11
by: jwessner | last post by:
I have a form (Form1) which contains basic Project data and a subform listing the personnel assigned to the Project as a continuous form. Selecting a person on that project and clicking on a command...
4
by: dizzydangler | last post by:
Hi all, I am a new Access user and just starting to get my head around some of the basic concepts, so please take it easy on me :) My company has been managing client records on excel, and I’m in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.