473,320 Members | 1,744 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,320 software developers and data experts.

How can I check if my highlighted field is selected !

22
Hello,

I am new to VB&Access and inherited a project. I have a form with multiple buttons and if one is clicked then a few fields under the buttons are highlighted. Different fields are selected/highlighted depending on what button I click. I have managed to write VB code to throw up and error if a field is null, but that doesn't help me much because on a different button click that field might not need to be filled in.

I am wondering how I can do a check if the field is highlighted, if so then that AND my If NotNull code will be sufficient.

Currently this is the only code I have:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command147_GotFocus()
  2.  
  3. If IsNull(WorkRequested) = True Then
  4. MsgBox "Required field: The Work Requested field must be filled in."
  5. End If
  6.  
  7. End Sub
Thank you for any help!

** Edit **

Attached Images
File Type: jpg Capture.jpg (78.0 KB, 557 views)
Oct 17 '11 #1
15 2283
NeoPa
32,556 Expert Mod 16PB
If you post the code used to highlight some of the controls (not fields BTW) then we can help you detect the changes that have been applied more easily.
Oct 17 '11 #2
johnnyc
22
Hello Neo,

I'm not sure where in this code it is:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Option Compare Database
  3.  
  4. Private Sub ApprovedSM_AfterUpdate()
  5. On Error GoTo Err_ApprovedSM_AfterUpdate
  6.  
  7.     If Me.ApprovedSM = -1 Then
  8.         ApprovedDate = Now()
  9.         Status = 2
  10.         SubStatus = 8
  11.     End If
  12.     DoCmd.Requery "approveddate"
  13.     DoCmd.Requery "Status"
  14.     DoCmd.Requery "substatus"
  15.  
  16. Exit_ApprovedSM_AfterUpdate:
  17.     Exit Sub
  18.  
  19. Err_ApprovedSM_AfterUpdate:
  20.     MsgBox Err.Description
  21.     Resume Exit_ApprovedSM_AfterUpdate
  22.  
  23. End Sub
  24.  
  25. Private Sub Calltaker_Change()
  26. On Error GoTo Err_Calltaker_Change
  27.  
  28.     EstimateNo = [Contact ID] & [Job ID]
  29. Exit_Calltaker_Change:
  30.     Exit Sub
  31.  
  32. Err_Calltaker_Change:
  33.     MsgBox Err.Description
  34.     Resume Exit_Calltaker_Change
  35.  
  36. End Sub
  37.  
  38. Private Sub cboNewJob_Click()
  39. On Error GoTo Err_cboNewJob_Click
  40.  
  41.     DoCmd.GoToRecord , , acNewRec
  42.  
  43. Exit_cboNewJob_Click:
  44.     Exit Sub
  45.  
  46. Err_cboNewJob_Click:
  47.     MsgBox Err.Description
  48.     Resume Exit_cboNewJob_Click
  49.  
  50. End Sub
  51. Private Sub CBoStatus_AfterUpdate()
  52. On Error GoTo Err_CBoStatus_AfterUpdate
  53.  
  54.     If [CboStatus] = "Won Estimate" Then
  55.         [JobStatus] = 22
  56.     End If
  57.  
  58. Exit_CBoStatus_AfterUpdate:
  59.     Exit Sub
  60.  
  61. Err_CBoStatus_AfterUpdate:
  62.     MsgBox Err.Description
  63.     Resume Exit_CBoStatus_AfterUpdate
  64.  
  65. End Sub
  66. Private Sub CboZip_AfterUpdate()
  67. On Error GoTo Err_CboZip_AfterUpdate
  68.  
  69.     DoCmd.Save
  70.  
  71. Exit_CboZip_AfterUpdate:
  72.     Exit Sub
  73.  
  74. Err_CboZip_AfterUpdate:
  75.     MsgBox Err.Description
  76.     Resume Exit_CboZip_AfterUpdate
  77.  
  78. End Sub
  79. Private Sub Combocity_AfterUpdate()
  80. On Error GoTo Err_Combocity_AfterUpdate
  81.  
  82.     DoCmd.Save
  83.  
  84. Exit_Combocity_AfterUpdate:
  85.     Exit Sub
  86.  
  87. Err_Combocity_AfterUpdate:
  88.     MsgBox Err.Description
  89.     Resume Exit_Combocity_AfterUpdate
  90.  
  91. End Sub
  92. Private Sub Contact_Email_Address_DblClick(Cancel As Integer)
  93. On Error GoTo Err_Contact_Email_Address_DblClick
  94.  
  95.    Call SendEmail(Me.[Contact Email Address])
  96.  
  97. Exit_Contact_Email_Address_DblClick:
  98.     Exit Sub
  99.  
  100. Err_Contact_Email_Address_DblClick:
  101.     MsgBox Err.Description
  102.     Resume Exit_Contact_Email_Address_DblClick
  103.  
  104. End Sub
  105.  
  106. Private Sub Check186_AfterUpdate()
  107. On Error GoTo Err_Check186_AfterUpdate
  108.  
  109.     If Me.ContractDeliverd = -1 Then
  110.         Me.DliveredDate = Now()
  111.     End If
  112.  
  113. Exit_Check186_AfterUpdate:
  114.     Exit Sub
  115.  
  116. Err_Check186_AfterUpdate:
  117.     MsgBox Err.Description
  118.     Resume Exit_Check186_AfterUpdate
  119.  
  120. End Sub
  121.  
  122. Private Sub Check198_AfterUpdate()
  123. On Error GoTo Err_Check198_AfterUpdate
  124.  
  125.     If [Check198] = -1 Then
  126.         Me.assignedtoRep = Now()
  127.         Me.[SubStatus] = 4
  128.     End If
  129.     DoCmd.Requery "SubStatus"
  130.     DoCmd.Requery "assignedtorep"
  131.  
  132. Exit_Check198_AfterUpdate:
  133.     Exit Sub
  134.  
  135. Err_Check198_AfterUpdate:
  136.     MsgBox Err.Description
  137.     Resume Exit_Check198_AfterUpdate
  138.  
  139. End Sub
  140.  
  141. Private Sub Check202_AfterUpdate()
  142. On Error GoTo Err_Check202_AfterUpdate
  143.  
  144.     If Check202 = -1 Then
  145.         Me.Status = 3
  146.     End If
  147.     DoCmd.Requery "status"
  148.  
  149. Exit_Check202_AfterUpdate:
  150.     Exit Sub
  151.  
  152. Err_Check202_AfterUpdate:
  153.     MsgBox Err.Description
  154.     Resume Exit_Check202_AfterUpdate
  155.  
  156. End Sub
  157.  
  158. Private Sub Check205_AfterUpdate()
  159. On Error GoTo Err_Check205_AfterUpdate
  160.  
  161.     If [Check205] = -1 Then
  162.         Me.Text207 = Now()
  163.     End If
  164.     DoCmd.Requery "Text207"
  165. Exit_Check205_AfterUpdate:
  166.     Exit Sub
  167.  
  168. Err_Check205_AfterUpdate:
  169.     MsgBox Err.Description
  170.     Resume Exit_Check205_AfterUpdate
  171.  
  172.  
  173. End Sub
  174.  
  175. Private Sub Check208_AfterUpdate()
  176. On Error GoTo Err_Check208_AfterUpdate
  177.  
  178.     If [followup2] = -1 Then
  179.         Me.Followup2date = Now()
  180.     End If
  181.  
  182. Exit_Check208_AfterUpdate:
  183.     Exit Sub
  184.  
  185. Err_Check208_AfterUpdate:
  186.     MsgBox Err.Description
  187.     Resume Exit_Check208_AfterUpdate
  188.  
  189. End Sub
  190.  
  191. Private Sub Check213_AfterUpdate()
  192. On Error GoTo Err_Check213_AfterUpdate
  193.  
  194.     If Check213 = -1 Then
  195.         Me.followup3date = Now()
  196.     End If
  197.  
  198. Exit_Check213_AfterUpdate:
  199.     Exit Sub
  200.  
  201. Err_Check213_AfterUpdate:
  202.     MsgBox Err.Description
  203.     Resume Exit_Check213_AfterUpdate
  204.  
  205. End Sub
  206.  
  207. Private Sub cmdRename_Click()
  208. On Error GoTo Err_cmdRename_Click
  209.  
  210.     Dim Msg, Style, Title, Response, MyString
  211. Msg = "Caution This will copy the contact info to the Estimate Page, This can not be reversed."    ' Define message.
  212. Style = vbYesNo + vbCritical + vbDefaultButton2    ' Define buttons.
  213. Title = "Are You Sure You Want To Continue!"    ' Define title.
  214.         ' context.
  215.         ' Display message.
  216. Response = MsgBox(Msg, Style, Title)
  217. If Response = vbYes Then    ' User chose Yes.
  218.     Me.JobAddress = Forms!Contacts!Address
  219.     Me.City = Forms!Contacts!ContactCity
  220.     Me.State = Forms!Contacts!StateOrProvince
  221.     Me.Zip = Forms!Contacts!PostalCode
  222.     Me.[Job Name] = Forms!Contacts!CompanyName
  223.     Me.ContactPhone = Forms!Contacts!WorkPhone
  224.     Me.ContactFax = Forms!Contacts!FaxNumber
  225.     Me.ContactMobile = Forms!Contacts!MobilePhone
  226.     Me.Region = Forms!Contacts!Region    ' Perform some action.
  227. Else    ' User chose No.
  228.     DoCmd.CancelEvent ' Perform some action.
  229. End If
  230.  
  231. Exit_cmdRename_Click:
  232.     Exit Sub
  233.  
  234. Err_cmdRename_Click:
  235.     MsgBox Err.Description
  236.     Resume Exit_cmdRename_Click
  237.  
  238.  
  239. End Sub
  240.  
  241. Private Sub Command180_Click()
  242.     AllowEdits = True
  243. End Sub
  244.  
  245. Private Sub Command181_Click()
  246.     AllowEdits = False
  247. End Sub
  248.  
  249. Private Sub ContactEmailAddress_DblClick(Cancel As Integer)
  250. On Error GoTo Err_Contact_Email_Address_DblClick
  251.  
  252.    Call SendEmail(Me.[Contact Email Address])
  253.  
  254. Exit_Contact_Email_Address_DblClick:
  255.     Exit Sub
  256.  
  257. Err_Contact_Email_Address_DblClick:
  258.     MsgBox Err.Description
  259.     Resume Exit_Contact_Email_Address_DblClick
  260.  
  261. End Sub
  262.  
  263. Private Sub ContractDeliverd_AfterUpdate()
  264. On Error GoTo Err_ContractDeliverd_AfterUpdate
  265.  
  266.     If ContractDeliverd = -1 Then
  267.         Me.DeliveredDate = Now()
  268.         Me.SubStatus = 7
  269.     End If
  270.     DoCmd.Requery "DeliveredDate"
  271.     DoCmd.Requery "substatus"
  272.  
  273. Exit_ContractDeliverd_AfterUpdate:
  274.     Exit Sub
  275.  
  276. Err_ContractDeliverd_AfterUpdate:
  277.     MsgBox Err.Description
  278.     Resume Exit_ContractDeliverd_AfterUpdate
  279.  
  280. End Sub
  281.  
  282. Private Sub followup2_AfterUpdate()
  283. On Error GoTo Err_followup2_AfterUpdate
  284.  
  285.  
  286.     If followup2 = -1 Then
  287.         Me.Followup2date = Now()
  288.     End If
  289.     DoCmd.Requery "Followup2date"
  290.  
  291. Exit_followup2_AfterUpdate:
  292.     Exit Sub
  293.  
  294. Err_followup2_AfterUpdate:
  295.     MsgBox Err.Description
  296.     Resume Exit_followup2_AfterUpdate
  297.  
  298. End Sub
  299.  
  300. Private Sub Followup3_AfterUpdate()
  301. On Error GoTo Err_followup3_AfterUpdate
  302.     If Followup3 = -1 Then
  303.        Me.followup3date = Now()
  304.     End If
  305.     DoCmd.Requery "Followup3Date"
  306.  
  307. Exit_followup3_AfterUpdate:
  308.     Exit Sub
  309.  
  310. Err_followup3_AfterUpdate:
  311.     MsgBox Err.Description
  312.     Resume Exit_followup3_AfterUpdate
  313.  
  314. End Sub
  315.  
  316. Private Sub Form_Load()
  317. On Error GoTo Err_Form_Load
  318.  
  319.     Me.CallTaker.SetFocus
  320.     If (Forms!LoginFrm!Adminbx = -1 Or Forms!LoginFrm!salesManager = -1 Or Forms!LoginFrm![Call Taker] = -1) Then
  321.         Me.EstimateNo.Locked = False
  322.         Me.EstimateDate.Locked = False
  323.         Me.CallTaker.Locked = False
  324.         Me.JobName.Locked = False
  325.         Me.JobAddress.Locked = False
  326.         Me.City.Locked = False
  327.         Me.State.Locked = False
  328.         Me.Zip.Locked = False
  329.         Me.ContactName.Locked = False
  330.         Me.ContactPhone.Locked = False
  331.         Me.ContactFax.Locked = False
  332.         Me.ContactMobile.Locked = False
  333.         Me.ContactPager.Locked = False
  334.         Me.ContactEmailAddress.Locked = False
  335.         Me.ExpectedServiceDate.Locked = False
  336.         Me.ExpectedServiceTime.Locked = False
  337.         Me.CboRegion.Locked = False
  338.         Me.SalesCampaign.Locked = False
  339.         Me.Calltype.Locked = False
  340.         Me.Status.Locked = False
  341.         Me.SubStatus.Locked = False
  342.         Me.SalesCampaign.Locked = False
  343.         Me.followup3date.Locked = False
  344.         Me.Followup2date.Locked = False
  345.         Me.Text207.Locked = False
  346.         Me.DeliveredDate.Locked = False
  347.         Me.ApprovedDate.Locked = False
  348.         Me.assignedtoRep.Locked = False
  349.         Me.Check198.Locked = False
  350.         Me.ApprovedSM.Locked = False
  351.  
  352.     Else
  353.         Me.EstimateNo.Locked = True
  354.         Me.EstimateDate.Locked = True
  355.         Me.CallTaker.Locked = True
  356.         Me.JobName.Locked = True
  357.         Me.JobAddress.Locked = True
  358.         Me.City.Locked = True
  359.         Me.State.Locked = True
  360.         Me.Zip.Locked = True
  361.         Me.ContactName.Locked = True
  362.         Me.ContactPhone.Locked = True
  363.         Me.ContactFax.Locked = True
  364.         Me.ContactMobile.Locked = True
  365.         Me.ContactPager.Locked = True
  366.         Me.ContactEmailAddress.Locked = True
  367.         Me.ExpectedServiceDate.Locked = True
  368.         Me.ExpectedServiceTime.Locked = True
  369.         Me.CboRegion.Locked = True
  370.         Me.SalesCampaign.Locked = True
  371.         Me.Calltype.Locked = True
  372.         Me.Status.Locked = True
  373.         Me.SubStatus.Locked = True
  374.         Me.SalesCampaign.Locked = True
  375.         Me.followup3date.Locked = True
  376.         Me.Followup2date.Locked = True
  377.         Me.Text207.Locked = True
  378.         Me.DeliveredDate.Locked = True
  379.         Me.ApprovedDate.Locked = True
  380.         Me.assignedtoRep.Locked = True
  381.         Me.Check198.Locked = True
  382.         Me.ApprovedSM.Locked = True
  383.  
  384.     End If
  385. Exit_Form_Load:
  386.     Exit Sub
  387.  
  388. Err_Form_Load:
  389.     MsgBox Err.Description
  390.     Resume Exit_Form_Load
  391.  
  392.  End Sub
  393. Private Sub Job_Name_AfterUpdate()
  394. On Error GoTo Err_Job_Name_AfterUpdate
  395.  
  396.     EstimateNo = [Contact ID] & [Job ID]
  397.  
  398. Exit_Job_Name_AfterUpdate:
  399.     Exit Sub
  400.  
  401. Err_Job_Name_AfterUpdate:
  402.     MsgBox Err.Description
  403.     Resume Exit_Job_Name_AfterUpdate
  404.  
  405. End Sub
  406. Private Sub JobID_AfterUpdate()
  407. On Error GoTo Err_JobID_AfterUpdate
  408.  
  409.     JobTable!JobID = Forms!Contacts!subQuestionFrm!JobID
  410.  
  411. Exit_JobID_AfterUpdate:
  412.     Exit Sub
  413.  
  414. Err_JobID_AfterUpdate:
  415.     MsgBox Err.Description
  416.     Resume Exit_JobID_AfterUpdate
  417.  
  418. End Sub
  419. Private Sub Command117_Click()
  420. On Error GoTo Err_Command117_Click
  421.  
  422.     Dim stDocName As String
  423.  
  424.     stDocName = "estimatewkshtrpt"
  425.     DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
  426.  
  427. Exit_Command117_Click:
  428.     Exit Sub
  429.  
  430. Err_Command117_Click:
  431.     MsgBox Err.Description
  432.     Resume Exit_Command117_Click
  433.  
  434. End Sub
  435. Private Sub Command121_Click()
  436. On Error GoTo Err_Command121_Click
  437.  
  438.  
  439.     DoCmd.GoToRecord , , acFirst
  440.  
  441. Exit_Command121_Click:
  442.     Exit Sub
  443.  
  444. Err_Command121_Click:
  445.     MsgBox Err.Description
  446.     Resume Exit_Command121_Click
  447.  
  448. End Sub
  449. Private Sub Command122_Click()
  450. On Error GoTo Err_Command122_Click
  451.  
  452.  
  453.     DoCmd.GoToRecord , , acPrevious
  454.  
  455. Exit_Command122_Click:
  456.     Exit Sub
  457.  
  458. Err_Command122_Click:
  459.     MsgBox Err.Description
  460.     Resume Exit_Command122_Click
  461.  
  462. End Sub
  463. Private Sub Command123_Click()
  464. On Error GoTo Err_Command123_Click
  465.  
  466.  
  467.     DoCmd.GoToRecord , , acLast
  468.  
  469. Exit_Command123_Click:
  470.     Exit Sub
  471.  
  472. Err_Command123_Click:
  473.     MsgBox Err.Description
  474.     Resume Exit_Command123_Click
  475.  
  476. End Sub
  477. Private Sub Command124_Click()
  478. On Error GoTo Err_Command124_Click
  479.  
  480.  
  481.     DoCmd.GoToRecord , , acNext
  482.  
  483. Exit_Command124_Click:
  484.     Exit Sub
  485.  
  486. Err_Command124_Click:
  487.     MsgBox Err.Description
  488.     Resume Exit_Command124_Click
  489.  
  490. End Sub
  491. Private Sub Command141_Click()
  492. On Error GoTo Err_Command141_Click
  493.  
  494.     Dim stDocName As String
  495.     Dim stLinkCriteria As String
  496.  
  497.     stDocName = "EstimateReportfrm"
  498.     DoCmd.OpenForm stDocName, , , stLinkCriteria
  499.  
  500. Exit_Command141_Click:
  501.     Exit Sub
  502.  
  503. Err_Command141_Click:
  504.     MsgBox Err.Description
  505.     Resume Exit_Command141_Click
  506.  
  507. End Sub
  508. Private Sub Command142_Click()
  509. On Error GoTo Err_Command142_Click
  510.  
  511.     Dim stDocName As String
  512.     Dim stLinkCriteria As String
  513.  
  514.     stDocName = "SubJobsIDFrm"
  515.     DoCmd.OpenForm stDocName, , , stLinkCriteria
  516.  
  517. Exit_Command142_Click:
  518.     Exit Sub
  519.  
  520. Err_Command142_Click:
  521.     MsgBox Err.Description
  522.     Resume Exit_Command142_Click
  523.  
  524. End Sub
  525. Private Sub Command143_Click()
  526. On Error GoTo Err_Command143_Click
  527.  
  528.     DoCmd.PrintOut
  529.  
  530. Exit_Command143_Click:
  531.     Exit Sub
  532.  
  533. Err_Command143_Click:
  534.     MsgBox Err.Description
  535.     Resume Exit_Command143_Click
  536.  
  537. End Sub
  538. Private Sub Command146_Click()
  539. On Error GoTo Err_Command146_Click
  540.  
  541.     Dim stDocName As String
  542.     Dim stLinkCriteria As String
  543.  
  544.     stDocName = "ProposalFrm"
  545.     DoCmd.OpenForm stDocName, , , stLinkCriteria
  546.  
  547. Exit_Command146_Click:
  548.     Exit Sub
  549.  
  550. Err_Command146_Click:
  551.     MsgBox Err.Description
  552.     Resume Exit_Command146_Click
  553.  
  554. End Sub
  555. Private Sub Command147_Click()
  556. On Error GoTo Err_Command147_Click
  557.  
  558.    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
  559. Exit_Command147_Click:
  560.     Exit Sub
  561.  
  562. Err_Command147_Click:
  563.     MsgBox Err.Description
  564.     Resume Exit_Command147_Click
  565.  
  566. End Sub
  567. Private Sub Command159_Click()
  568. On Error GoTo Err_Command159_Click
  569.  
  570.     DoCmd.PrintOut
  571.  
  572. Exit_Command159_Click:
  573.     Exit Sub
  574.  
  575. Err_Command159_Click:
  576.     MsgBox Err.Description
  577.     Resume Exit_Command159_Click
  578.  
  579. End Sub
  580. Private Sub Command165_Click()
  581. On Error GoTo Err_Command165_Click
  582.  
  583.     Dim stDocName As String
  584.  
  585.     stDocName = "EstRpt"
  586.     DoCmd.OpenReport stDocName, acNormal
  587.  
  588. Exit_Command165_Click:
  589.     Exit Sub
  590.  
  591. Err_Command165_Click:
  592.     MsgBox Err.Description
  593.     Resume Exit_Command165_Click
  594.  
  595. End Sub
  596.  
  597. Private Sub Label140_DblClick(Cancel As Integer)
  598.     DoCmd.OpenForm "JobCostManvilleMod"
  599. End Sub
  600.  
  601. Private Sub Status_AfterUpdate()
  602. On Error GoTo Err_Status_AfterUpdate
  603.  
  604.     If Status = "2" Then
  605.         Forms!Contacts!SubJobsForm!JobStatus = 22
  606.     End If
  607.     If Status = "2" Then
  608.       Forms!Contacts!SubJobsForm!JobDate = Now()
  609.     End If
  610.  
  611. Exit_Status_AfterUpdate:
  612.     Exit Sub
  613.  
  614. Err_Status_AfterUpdate:
  615.     MsgBox Err.Description
  616.     Resume Exit_Status_AfterUpdate
  617.  
  618. End Sub
  619.  
  620. Private Sub Status_Change()
  621. On Error GoTo Err_Status_Change
  622.  
  623.     If Forms!Contacts!SubJobsForm!Status = "Lost Estimate" Then
  624.         Forms!Contacts!cboCustpros = 188
  625.     End If
  626.  
  627. Exit_Status_Change:
  628.     Exit Sub
  629.  
  630. Err_Status_Change:
  631.     MsgBox Err.Description
  632.     Resume Exit_Status_Change
  633.  
  634. End Sub
  635.  
  636. Private Sub Toggle23_GotFocus()
  637.  
  638. End Sub
  639.  
  640. Private Sub WorkRequested_Click()
  641.  
  642. End Sub
  643.  
  644.  
  645.  
Oct 18 '11 #3
NeoPa
32,556 Expert Mod 16PB
Nor can I (and that's something to be concerned about). To confirm you actually have the correct module posted can you post the name of the Command Button control which was clicked to highlight those controls that are yellow in the picture, as well as at least one of the names of the controls (probably TextBoxes) that have been so highlighted.
Oct 18 '11 #4
johnnyc
22
Neo,

I don't know much about Access so please bear with me. When I click on the textbox "Type of work Being Requested" under the Properties, then data, it tells me the Control Source is Type of Work Being Requested. Where would/and how would I edit that or find that is it in a module?

Also all the button on the form are labeled Toggle 23 through Toggle30.
Oct 19 '11 #5
NeoPa
32,556 Expert Mod 16PB
Never a problem with inexperience, as long as it's explained clearly as you have there Johnny.

Let me see if I can lay out some easy-to-follow instructions for you to provide me with the information that'll help :
  1. Open database and the form.
  2. Reproduce the picture included in your OP (Opening Post).
  3. Make a mental note of the button you clicked to to produce that situation. We'll refer to that for now as [ButtonX].
  4. Make a mental note of the first control on the form which is highlighted in yellow (The one with the label reading 'Type of Work Being Requested:'). We'll refer to that for now as [TextBoxY].
  5. Switch the form into Design Mode (From the View Menu select Design View).
  6. Ensure the Properties pane is visible (Alt-Enter).
  7. Click on [ButtonX] to select it and make a note of the value in the property called Name.
  8. Click on [TextBoxY] to select it and make a note of the value in the property called Name.
  9. Include in your next post the names of the controls [ButtonX] and [TextBoxY].
Oct 19 '11 #6
johnnyc
22
Neo,

You have great patience.. Thank you.

ButtonX is called "Toggle28".
TextBoxY is called "Word Requested"

** Snip **
Oct 19 '11 #7
NeoPa
32,556 Expert Mod 16PB
I can confirm that the code posted doesn't contain anything related to this function in that case. That indicates the strong probability that macros have been used instead of code ;-( Not good news at all!

If you go to the previous instructions and get to where you selected [Toggle28] then looked at the properties, I want you to scroll down the properties until you see the one called On Click. Normally, for code, this would say [Event Procedure]. Can you let me know what it says here for [Toggle28].

Next go to the Macros part of the database and tell me all that you see there in the macro of that name. You may need to be very thorough here, as I never work with macros (Very few professional developers ever touch them - and we always wash our hands thoroughly afterwards). Hopefully there will be some information there I can interpret to indicate how to do some code to handle your problem.

PS. I'll just remove the side-notes about toolbars. They're not part of the topic and they're no longer required even to assist you, so I'll snip them.
Oct 19 '11 #8
johnnyc
22
Neo,

There are no event procedures for any of the events on any buttons unfortunately.

Not sure if this is right - if not please let me know where else it is located:

There is a folder called "Modules" that I see from VBA. Under it there are nine macros files:

basaddalltolist
basAutomateOutlook
basCommonFile
basCRLF
basNotinList
basUtilites
modGlobals
modRibbonCallbacks
Relinker
Oct 19 '11 #9
NeoPa
32,556 Expert Mod 16PB
That's a misunderstanding Johnny (so not right - no).

Please reread the previous post. [Event Procedure] is what you'd expect to see normally. I wouldn't expect to see that in your database as I believe macros have nbeen used instead.

When you have the name of the macro to hand, open the folder called "Macros" (rather than "Modules") and you should find the macro there.
Oct 19 '11 #10
johnnyc
22
Neo,

You are most likely right in regards to the macros, there is no On Click property for Toggle28, no other events either for Toggle 28.

I found the Macros builds but did not see anything in them in regards to the Toggle or any other reference to the fields. I might have to just skip this problem one as it looks like it will need an expert hand to edit this particular issue.

Thank you for your time! Should I delete the post ?
Oct 19 '11 #11
NeoPa
32,556 Expert Mod 16PB
JohnnyC:
Thank you for your time! Should I delete the post?
No. If we can't manage to resolve the issue then we leave the thread in place. Someone else may be able to benefit where you weren't able to.

Very confusing though, Johnny. There is an On Click event property when I create a Toggle control on my test form :-S Are you sure you have either the All or the Event tab showing? Did you scroll down the list if it's the All tab showing. It may not have anything in it, but it must exist at least.

If it's empty then I know there must be an Option Group control that it's within. In that case I need to see what's in the After Update event property of that control.
Oct 19 '11 #12
johnnyc
22
Neo,

I know, when I run a test from scratch and build a new button I get the same thing it should have an Onlick. None of the buttons do, which is strange to me. I scrolled down on the "all" tab as well as the "Event" tab. All my other buttons on the application do have an on-click only these in this sub form do not.

No events in "After Update" either. There are two after update events but they belong to the main form not the subform that is displayed at the top, I can paste those if you think it might help.
Oct 20 '11 #13
NeoPa
32,556 Expert Mod 16PB
No, but if you can take a small screenshot of the properties page when that control (earlier referred to as [CommandX]) is selected I'd be interested in seeing exactly what it is you're describing.
Oct 20 '11 #14
johnnyc
22
I can only see inserting an image link not an attachment on this reply box. Is there a way to place an attachment here? I have only seen that when I started my post.
Oct 20 '11 #15
NeoPa
32,556 Expert Mod 16PB
Your first post attaches an image Johnny. I amended it to show the picture in the post (using BB Code), but you attached it originally.

Of course, you can use a link instead with the same BB Code if you prefer.
Oct 21 '11 #16

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

Similar topics

3
by: Roger | last post by:
How can I check if a field already exist in a table? If it doesn't exist I want to add it with ALTER TABLE ADD...
5
by: Krechting | last post by:
Hi ALl, I have a code that checks if the documents in a hyperlink field are still where they should be. I use fileexist(). First I want to filter out all the hyperlink fields that are empty. I...
5
by: BBFrost | last post by:
Win2000 ..Net 1.1 SP1 c# using Visual Studio Ok, I'm currently in a "knock down - drag out" tussle with the .Net 1.1 datagrid. I've come to realize that a 'block' of rows highlighted within...
2
by: Alex Smith | last post by:
Hi Friends, How can I check a checkbox selected more than one times in DataGrid ? My First Priority is check with Client Side(Java Script), if it is not easy than check server side (C#). Thanks...
0
by: PCCTN | last post by:
OK I have a database set up with three tables but only two I need help with Invoices Customers The fields for both tables are the same Name - address City State Zip
1
by: Coll | last post by:
I have a form with a subform on it. On my main form, you select an employee id number and the top portion of form fills in with data, and the bottom portion of the form,which is a subform, lists...
3
by: =?Utf-8?B?SmFtZXMgUGFnZQ==?= | last post by:
I've a multiview with 3 views. on view 2 the user is presented with a check box list (items from database) at view 3 the user can review their selections and, either post to the database or go back...
6
by: Josh Mitchell | last post by:
Hello, Could anyone direct me to some sample script that makes a div or text visible only when a webform field in selected. So for example, in the below snippet, I want the text "Your username...
1
by: Agnes | last post by:
pKcno = myReader.Item("kcno") <--it will return error when the field "kcno" doesn't exist any method to check the field exist or not first , if not exist, I want to skip the above statement. ...
3
by: cj2 | last post by:
if myodbcreader.hasrows then if myodbcreader("code").trim = "" or myodbcreader("reas").trim = "aVAL" then do something endif endif Is this the appropriate way to test if the code field is...
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
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...

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.