Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Big Problem 1

Status
Not open for further replies.

jdwm2310

Technical User
Jul 26, 2001
396
US
I have an OptionBox which has two options: Solved by and Routed To....When the user clicks on Solved by two textboxes become visible: "Solved by" and "Date Solved" - ok this works flawlessly...The "Solved by" and "Date Solved" data provide a default value for two textboxes in a section called Ticket History however when I go to add a new ticket I see today's date on date solved. I didn't even solved the ticket and it shows today's date. Any help would be greatly appreciated..Thanks
 
Did you set the field to have a default value? If so, get rid of that and set the date only in the update of the form controls... Jeff Roberts
Analysis, Design, & Implementation
RenaissanceData.com
 
ok the field is unbound what do you mean set the date only in the update of the form controls???
 
Is this what you mean, in the default value section of the unbound textbox i have
=[Date Closed].[AfterUpdate]
 
Something like this:
[tt]
txtSolvedBy_AfterUpdate()

if len(txtSolvedBy) then

me.txtDateSolved = Date()

end

end sub[/tt] Jeff Roberts
Analysis, Design, & Implementation
RenaissanceData.com
 
oh my Lord I have a mess, the dates are visible with todays date, you see when the user clicks on the option box two textboxes become visible. for example if i click solved by i will be prompt to fill solved by and date closed. the date closed has a default value of =Now()
this date will be inputed in the unbound textbox...please help I am freaking out....
 
So...

Get rid of the Default value in the DateClosed box. You want to update this:

1. Directly by user (especially if someone needs to be able to indicate that it was solved for a past date)

OR:

2. By code with a value of Date() (if only current date is acceptable or if you allow editing in the box by user)

QUESTION: Which of these form controls/textboxes actually are bound to fields in a table? Do these fields, where applicable, have default values? Jeff Roberts
Analysis, Design, & Implementation
RenaissanceData.com
 
Ok
I removed the default value of =Now()
Textboxes "Date Closed" and "Date Routed" are binded to Table HelpDeskCalls, I would like them to have Date() values where the users can't do editing.

Then the unbound boxes "Date Completed" and "Date Routed" have default values of the above textboxes.
 
What purpose do the unbound boxes serve? ('Unbound' meaning that they are not linked to a table field)

Maybe backup and describe what you wish to accomplish (distinct from programming steps)...reading the first post makes me wonder why you don't just expose the fields--there's no real reason to have a Boolean (chkbx) value when the presence of a DateSolved & SolvedBy value(s) will be the answer to the question "Solved?". Jeff Roberts
Analysis, Design, & Implementation
RenaissanceData.com
 
Well the reason I have I have the following boxes: solved by, date solved by, routed to and date routed invisible. is that I want the user to have a choice that's why they click on the option box either solved or routed. if they select solved they get the solved by and date solved. if they select routed to they can see the routed to and date routed. I hope you understand my madness.

As for the unbound boxes, i have them b/c when i add a new ticket and decide to go back to the first i am unable to see the selected option. so let say i created a ticket and selected solved by in the option box and all the text become visible when i close the form and reopen, the text that were once visible are invisible so I am unable to see who solved what and when....
 
It's your call but I'd suggest:

1. Have all four boxes visible and available
2. (1) but enable/disable boxes based on option (but
visible)
3. Use two boxes for the four possible fields and let the
option determine what the field means (or change
control source at runtime based on option)

Complicated stuff backfires on you (speaking from experience here). It never hurts to put an explanatory label on the form to guide users... Jeff Roberts
Analysis, Design, & Implementation
RenaissanceData.com
 
You know something, you are right i am giving myself extra work....I did exactly what you said and it looks great!!

The only problem is that now when I click to creat a new ticket the option is selected with the choice of the previous ticket.

On Current Event should i call the afterupdate event of the option box??
 
QueHay,

I inserted the Call Fram93_AfterUpdate but it is not working..what am I doing wrong????
 
Why don't you post your code and let's look at it...(make sure that the control has the "Event Procedure" response listed in its Events page--Access will let you paste code into a form module without letting the controls know that they're expected to respond to the events. Jeff Roberts
Analysis, Design, & Implementation
RenaissanceData.com
 
ok this is the code for Comob Box: NotInList Event

Private Sub Caller_Name_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_Caller_Name_NotInList
Response = acDataErrContinue
NewData = UCase(NewData)
If MsgBox(NewData & "is not an existing caller. Would you like to add it now?", vbYesNo + vbQuestion + vbDefaultButton1, "Caller not found....") = vbNo Then
Me.Caller_Name.Undo
Me.Caller_Name.Dropdown
Exit Sub
Else
DoCmd.OpenForm "ContactDetails", , , , acFormAdd, acDialog

DoCmd.Close , , acSaveYes
Me.Caller_Name.Undo
Me.Caller_Name.Requery
Me.Caller_Name = NewData
End If

Exit_Caller_Name_NotInList:
Exit Sub

Err_Caller_Name_NotInList:
MsgBox Err.Description
Resume Exit_Caller_Name_NotInList
End Sub
 
Drop me an email let's get this fixed without further public badminton <g>. jero@adelphia.net Jeff Roberts
Analysis, Design, & Implementation
RenaissanceData.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top