Qry within a tables field property

I have winzip pro 11.1 and it's fine on my machine.
 
That one worked Dan. You can just right click on a file and "Send to Compressed Folder" in WindowsXP and it will Zip it for you. Give me a few minutes to make the adjustments.
 
Uhh...it is going to take more than a few minutes. I'll post back when I have something for you.
 
again, thank you for looking at this.
If this proves to be taking too much of your time, I totally understand.
 
Dan,
This db opens on the new forms I created. See if that is what you were looking for.
 

Attachments

I don't know what that form is supposed to be doing. I would have to say that no, that isn't what I was aiming at.

I do appreciate your help though.

I think I'm well over my head with this one. :) programming really isn't my thing.

Before I post on a different problem, maybe you can help me:

I am trying to get a label or text box or box, to be a different background color if a radio button is marked and a different color if it is not marked.

Id really like it to be transparent if raido is not marked and yellow if it is.

So far I have tried the following form code with no results:

Private Sub Form_Current()
If IsNull(Option1) = True Then
Text1.BackColor = 16777215
Else
Text1.BackColor = 10092543
End If

End Sub


I was trying to follow/modify the example found here: example
 
Did you download the db I posted? My screen shows 0 VIEWS. The forms I made were so that a user could add classes for a Student. As for your next question, do you know how to put in a break and single step the code?
 
Yes I did download it. I looked at it again, just now too.
I was not able to enter any new students, but the dropdown on the courses is nice.

And No I don't know how to break and single step the code
 
See if this db helps with your BackColor issue. The forms I made were not designed to add new students but just to show how to display and add classes to existing students.
 

Attachments

Last edited:
That is ont he right track of what I am looking the colors to do and I did manage to get that far as well. But I really want that based on if a radio button is marked, then a text box will change colors.
 
Just put the code in the Click event of the RadioButton.
 
OK, I got the colors to work! Kind of...

I used this code:
Private Sub Form_Current()

If Option1.Value = True Then
Text1.BackColor = 10092543
Text2.BackColor = 10092543
Else
Text1.BackStyle = Transparent
Text2.BackStyle = Transparent
End If

End Sub

Where Option1 = radio button and text1 = radio button description, text2 = checkbox description for class completed or not.

And this works. I just can't get this to work on multiple If statements.

For example I need to include a total 0f 17 Options (radio buttons)
Is there a trick to multiple If statements?
 
I scrolled through 4 records, then scrolle dback and the color changes are no longer there. I then did a fix and compress db and no color changes are being done now. UG.
 
You are only setting the color to one state. Your else should set the color to the other state. Your next If...Else...EndIf simply goes right after the one you have. Remember, you will need similar code in the Click event of each Radio Button.
 
Thanks for ALL your help!

I did mange to get it all working! I wound up using conditional formatting on the text boxes to change color.

Thanks again!
Dan
 
Excellent Dan! Glad you got it all sorted and you are welcome.
 
Not to keep bugging you, but I'm trying to get some dates figured now.

I have 3 text boxes (text1, text2, text3)
In text1, I have the EnrollDate
In text2, I want it to auto calculate 18 mths away
In text3, I want it to show the difference between text2 and today's date. Essentially a count down of days left.

The closest I got is this code:
Private Sub Form_Current()
Text172.Value = DateAdd("m", 18, Text170.Value)
Text174.Value = DateDiff("d", Text172.Value, "=Date()")
End Sub

My problem, I think, is in the =Date() part. I haven't found how to get todays date written properly.
 
Dude, I just figured it out...

The date should be referenced as only "Date" - no quotes.

AND I also had default vaule code in the text box, which was preventing any data from being shown. I made these 2 changes and wa-la!
 
Try something like this:
Code:
Private Sub Form_Current()
   Me.Text172 = DateAdd("m", 18, Me.Text170)
   Me.Text174 = DateDiff("d", Me.Text172, Date)
End Sub
I prefer to use the predicate Me. when referencing controls on a form. You should also pick some useful, descriptive name like txtEnrollDate. You will also notice that I do not specify the .Value property since it is the default property for a control and need not be specified.
...I see you fixed it yourself. That's great. You're learning.
 

Users who are viewing this thread

Back
Top Bottom