Randomblink
The Irreverent Reverend
- Local time
- Today, 12:25
- Joined
- Jul 23, 2001
- Messages
- 279
Private Sub TARGET_LostFocus()
If Me.TARGET = "City" Then
PSRTYPE = "City"
Consultant_Selection.Visible = False
Design_Details__CITY_.Visible = True
Design_Details__CONTRACT_.Visible = False
Engineer_Data___Page.Visible = False
CTRCTM.Visible = True
ElseIf Me.TARGET = "Contract" Then
PSRTYPE = "Contract"
Consultant_Selection.Visible = True
Design_Details__CITY_.Visible = False
Design_Details__CONTRACT_.Visible = True
Engineer_Data___Page.Visible = True
CTRCTM.Visible = False
ElseIf IsEmpty(Me.TARGET) Then
Result = MsgBox("Please enter either City or Contract to move on please", vbOKOnly, "Entry is Required") = vbOK
Me.TARGET.SetFocus
End If
End Sub
This is the code...(don't tell me there is an easier way, Im not familiar enough with VB to get there). I want the STUPID STUPID combo box to check itself. If it has CITY as an Entry, I want it to invisible certain fields. If it is Contract as an Entry, I want it to invisible other fields. And...
...and here is where I am mystified...
If...it is null, empty, not filled in, blank, whatever else can mean NOT FILLED IN...
I want it to open a message box...wait for the user to hit OK...then set the focus right back on itself...
I have done this THOUSANDS (literally) of times with Access97. I have not tried it yet with Access 2000...at least not that it works. Im gonna include background on the fields real quick in case it would help.
TARGET - combo box
PSRTYPE - Project Type (either City or Contract)
Consultant_Selection - Is a page on a tab box
Design_Details_City - same as above
Design_Details_Contract - also same
Engineer_Data___Page - same same still
CTRCM - Textbox on a page in the tab box
PLEASE HELP! Im doing this database for the city...and hopefully some serious 'thank you's' and just want to get the little details worked out...argh!
I can't believe how hard this one thing is...I have done this many many times before...never had a problem...
If Me.TARGET = "City" Then
PSRTYPE = "City"
Consultant_Selection.Visible = False
Design_Details__CITY_.Visible = True
Design_Details__CONTRACT_.Visible = False
Engineer_Data___Page.Visible = False
CTRCTM.Visible = True
ElseIf Me.TARGET = "Contract" Then
PSRTYPE = "Contract"
Consultant_Selection.Visible = True
Design_Details__CITY_.Visible = False
Design_Details__CONTRACT_.Visible = True
Engineer_Data___Page.Visible = True
CTRCTM.Visible = False
ElseIf IsEmpty(Me.TARGET) Then
Result = MsgBox("Please enter either City or Contract to move on please", vbOKOnly, "Entry is Required") = vbOK
Me.TARGET.SetFocus
End If
End Sub
This is the code...(don't tell me there is an easier way, Im not familiar enough with VB to get there). I want the STUPID STUPID combo box to check itself. If it has CITY as an Entry, I want it to invisible certain fields. If it is Contract as an Entry, I want it to invisible other fields. And...
...and here is where I am mystified...
If...it is null, empty, not filled in, blank, whatever else can mean NOT FILLED IN...
I want it to open a message box...wait for the user to hit OK...then set the focus right back on itself...
I have done this THOUSANDS (literally) of times with Access97. I have not tried it yet with Access 2000...at least not that it works. Im gonna include background on the fields real quick in case it would help.
TARGET - combo box
PSRTYPE - Project Type (either City or Contract)
Consultant_Selection - Is a page on a tab box
Design_Details_City - same as above
Design_Details_Contract - also same
Engineer_Data___Page - same same still
CTRCM - Textbox on a page in the tab box
PLEASE HELP! Im doing this database for the city...and hopefully some serious 'thank you's' and just want to get the little details worked out...argh!
I can't believe how hard this one thing is...I have done this many many times before...never had a problem...