Do not use on any
shared computer
September 8, 2008 10:00am pdt
 
[x]
Attachment Details

VBA issue on click for command button and Save function

Tags: microsoft, access, 2003
I have a form that is driven by a query to display data based on a numeric value passed from a hidden form. Once my users input data into this form, in the footer of the form are a series of command buttons each driven by VBA code. One button is "Save" the other is "Open Ticket". I have included the code for both buttons below.

The problem I am having is that when the users enter the data and press "Open Ticket" sometimes and not always they system shows all the data fields as ##DELTED##. However the data was stored to the database table. The secondary code then sends a blank report to me. Also some times the form doesn't reflect the new entry and sends a blank record.

If the user inputs the data and presses "Save" then presses "Open Ticket" then the process works great 9 times out of 10. However the 1 time it doesn't the form is not storing the systemid to the table. This is how we know what type of ticket it is and it is a criteria in returning these thickets to the screen in the future.

As you can see in the code from the "Save" button and the "Open Ticket" button they both are calling for the save record the same way. However it is hit and miss if this is getting completed. I am at my wits end with this I have been looking at this and running over 100 tickets thru the system today to try and fix this. Any help would be greatly appreciated.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
---- Save command button ----
 
DoCmd.RunCommand acCmdSaveRecord
frm.Recalc 'To reset txtRecordNos
 
---- Open Ticket command button ----
 
txt_tt_sysid = Forms!frmissuesselection!txtsystemid
DoCmd.RunCommand acCmdSaveRecord
If Forms!frmissuesselection!txtsystemid = 1 Then
DoCmd.SendObject acSendReport, "rptttfssissueopen", acFormatHTML, "", "", , "New FSS Trouble Ticket # " & [Forms]![frmissues]![TroubleTicket], "", False, ""
End If
If Forms!frmissuesselection!txtsystemid = 2 Then
DoCmd.SendObject acSendReport, "rptttauthissueopen", acFormatHTML, "", "", , "New Auth Ticket # " & [Forms]![frmissues]![cmdIssueNumber], "", False, ""
End If
If Forms!frmissuesselection!txtsystemid = 3 Then
DoCmd.SendObject acSendReport, "rpttttechissueopen", acFormatHTML, "", "", , "New Network Ticket # " & [Forms]![frmissues]![txtTicketNumber], "", False, ""
End If
If Forms!frmissuesselection!txtsystemid = 4 Then
DoCmd.SendObject acReport, "rptttreseissueopen", acFormatHTML, Forms!frmissues!txtresemail, Forms!frmissues!txtacctmangemail, "", [Forms]![frmissues]![txtRes] & " Reference # " & [Forms]![frmissues]![txtresissuenumber], "", False, ""
End If
Start your free trial to view this solution
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Question Stats
Zone: Software
Question Asked By: woodje
Solution Provided By: MikeToole
Participating Experts: 2
Solution Grade: B
Views: 228
Translate:
Loading Advertisement...
 
[+][-]Expert Comment by eghtebas

Rank: Master

Expert Comment by eghtebas:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by eghtebas

Rank: Master

Expert Comment by eghtebas:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Accepted Solution by MikeToole

Rank: Guru

Accepted Solution by MikeToole:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by woodje
Author Comment by woodje:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by woodje
Author Comment by woodje:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by MikeToole

Rank: Guru

Expert Comment by MikeToole:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by woodje
Author Comment by woodje:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by MikeToole

Rank: Guru

Expert Comment by MikeToole:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34 / EE_QW_2_20070628