Search results

  1. D

    Entering info to forms

    That probably just means that your query is not updatable.. To check this, open up your query and look at the navigation buttons.. If the new record( >* ) button is grayed out, then the recordset is not updatable. Hope this helps. Doug
  2. D

    Array

    Two things that stick out... First off, I think you need the Equals(=) sign in front of the function... Expr1: =GetSumHighest([q1],[q2],[q3],[q4][q5],[q6]) And also, when you set the variables in the function, you don't need the brackets([]) So just use... arQuest(1) = q1 arQuest(2) =...
  3. D

    Array

    Not the most efficient code below... But it will work for you... This just sorts the array and then takes the final four values... Public Function GetSumHighest(quiz1 As Integer, quiz2 As Integer, quiz3 As Integer, quiz4 As Integer, _ quiz5 As Integer, quiz6 As Integer) As Integer...
  4. D

    open form in datasheet view

    Try this... DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria This should open it in Datasheet view... Hope this helps. Doug
  5. D

    importing data from a field with multiple pieces of information

    Put the following code into a module and run it... This will Open your original table, read line by line, and put the split result into the new table along with the Location ID. Sub ConvertField() Dim MyDB As Database Dim MyRecs As Recordset Dim MyRecs2 As Recordset Dim...
  6. D

    copy one field to another on same form

    Is the last name already in the underlying table? And are you just trying to get that name to move on to the other field? If so, you should use an update query, to update the ChildLastName to LastName.. Hope this is what you were looking for...
  7. D

    Last Question

    Hey no problem... I started once too... I had no idea what I was doing with Access when I first started my job 3 years ago... But with a good background for programming and a boss who's strict for deadlines, I was able to pick up on Access pretty well... Just keep on building databases and...
  8. D

    Last Question

    Okay then try this... This has to work eventually... for the checking of the box use this, replace the line "ctl.value = null" with the below code... if ctl.controltype = acCheckBox then ctl.Value = false else ctl.value = null end if and for the unchecking of the box use this, replace the...
  9. D

    Last Question

    Alright, I'm not sure why it's not working for you... Do you have any validation rules or anything for any of the boxes? When it does bomb out, what control is it on? To get this, when the error pops up, hit debug.. Then go to the intermediate window(ctrl+g) and type "? ctl.name" without the...
  10. D

    Last Question

    Alright, Here goes the modified attempt... Private Sub ChkBox_Click() Dim ctl As Control If chkbox Then For Each ctl In Controls If ctl.Tag = "ChangeOver" Then Me(ctl.Name & "i") = ctl.Value ctl.Value = Null End If...
  11. D

    Last Question

    Wouldn't you have to do the opposite of what you had to put the values back in the visible controls... Like so.. If Not isnull(me!NewTextBoxThatIsnotvisible)Then me!TextBox = me!NewTextBoxThatIsnotvisible else me!Textbox = null End if I think this is what you're looking for... By the way...
  12. D

    copy one field to another on same form

    In the AfterUpdate event of the LastName field, put the following code... me!ChildLastName = me!LastName That should do it for you. Hope that helps. Doug
  13. D

    Last Question

    I think that the syntax is wrong for the textboxes... Try this.. If Not isnull(me!TextBox)Then me!NewTextBoxThatIsnotvisible = me!TextBox else me!NewTextBoxThatIsnotvisible = null End if That should do it for you.. You don't need the .value on textboxes... If nothing is specified for a...
  14. D

    Last Question

    Well, for question #1... I'm assuming you want to fill the text box with a different piece of data that's related to what you selected from the combo box... If so, set the combo box to have 2 columns, or however many you need, keep the bound column the same as it was. Then you have to set the...
  15. D

    Run a make table query from code

    In the code for your print button before you print the report, put the following code in... docmd.setwarnings false docmd.openquery "QueryName" docmd.setwarnings true This code will turn off the system messages, run the query, and then turn the system messages back on. Hope this helps you. Doug
  16. D

    Different Coloured Fonts

    You can put the following code in the On_Current event of your form... This will change each textbox's forecolor as it comes up... If Now > Me![Expiry Date] Then Me![Expiry Date] = "Expired!" Me![Expiry Date].ForeColor = vbBlue ElseIf Now > (Me![Expiry Date] - 31) > 0...
  17. D

    beforeupdate to validate record

    Check Charity's answer from the following post... Should work for you if you throw it in the before update event of your primary key... http://www.access-programmers.co.uk/ubb/Forum4/HTML/003621.html
  18. D

    Displaying a recordset on a subform

    Create a seperate form with the recordset on it, the way you would like the subform to look. Then use that form as the source for the subform. Hope this is what you're looking for. Doug
  19. D

    Getting Text Box to work with Form

    sure, if they answer no, do the following... Cancel = True Me![FieldName].Undo This will cancel the update and undo the changes made. Hope that helps. Doug
  20. D

    Accept a " "(SPACE) as data?

    Well, you could use the format statement... Something like this in the AfterUpdate event of the field... Me!YourField = Format(Me!YourField, "!&&&&&&&&@") The bang(!) causes left to right place filling, the ampersand(&) causes a character to be displayed or nothing, and the At(@) will...
Back
Top Bottom