Search results

  1. A

    how to enable/disable textbox based on checkbox value

    Im not sure whether VBA allows it but have you thought of using a FOR loop! Im not sure however if you are able to send parameters in a fuction call tho!
  2. A

    Make a text box visible on cmd button

    set the initial visibility of the textbox to hidden through its own property or you can set the visibility of the textbox to hidden via the Form Load property via the VBA code
  3. A

    Grouping Question

    So what you want to do is have the following: EMPLOYEE DETAILS SPOUSE DETAILS OF THE ABOVE EMPLOYEE CHILDREN OF THE ABOVE EMPLOYEE DETAILS OF THE EMPLOYEES VEHICLE I think this is what you are after so let me know and I can explain it. Its not difficult its just that you have your GROUPING...
  4. A

    Error in my code and not sure what it is.

    Just a quick reply is the primary key in the "All Data Table" made up of a composite key. Another words is the primary key of this table made up of the three fields dpre, dsug, and dnum. If this is the case there is a much simpler method than the one you are attempting above. Let me know, and I...
  5. A

    Count

    I understand now what you after I think. What you need is a GROUPBY statement in your SELECT statement. I have to go to work so I havent the time to look but if you type Count + Group + Months in the query thread then you should get a lot of results there as this is a common problem on this...
  6. A

    Count

    rookie is there anyway you can post your database so that I can have a look myself. Im not the best at figuring out what people are after. Cheers Mike
  7. A

    Command Button to clear

    I think what you want is for the user to be able to enter a record then save this record and begin entering another record. If this is correct what Id do is have a macro on your command button which will close and reopen the form you are working on. This way, access will automatically save the...
  8. A

    Want cursor to appear in certain text box(simple question but cant figure out)

    Not sure ya need this but Im of to bed now so just in case Ive come up with the following: Private Sub submitbutton_Click() If IsNull(txtname) Then If MsgBox("Please enter the necessary information", vbOK, "Missing Info") = vbOK Then Me.txtname.SetFocus Else: DoCmd.RunMacro "exit" End...
  9. A

    Want cursor to appear in certain text box(simple question but cant figure out)

    is this the same problem that you have asked in the vba section or is this another problem. I have posted a recommendation on the other thread but if this is seperate let me know and I'll help you on it. Regards
  10. A

    Simple Code question, but cannot figure it out.

    What you need to do is have this in the afteropdate event of the select box. This way when the select box is changed then the user will be directed to the relevant area. Lookin at your code you look like you need something like Private Sub Status_AfterUpdate() If Me.Status = "DP Ready" Then...
  11. A

    Null insert statement

    Hey, me again I have the following module: Private Sub Exit_Click() Dim sqlstring As String sqlstring = "INSERT INTO Location ([PSM Code], [Tool number], [Model No], [Die Bay], [Line number], [Linked to], [Press1], [Press2], [Press3], [Press4], [Press5], [Press6], [location1])" sqlstring =...
  12. A

    SQL Update statement

    Thanks for the reply igkuk7 the code I needed is: Private Sub ExitForm_Click() If Not IsNull(linked) Then Dim sqlstring As String sqlstring = "UPDATE Location SET location1= '" & [Forms]![View die locations]![location1] & "', location2= '" & [Forms]![View die locations]![location2] & "'...
  13. A

    SQL Update statement

    apoligies sergeant ive re-read your last post and made the changes with the single quotation marks. It is now working thanks very much Mike
  14. A

    SQL Update statement

    THanks for the reply Sergeant, that unfortunately doesnt work. What Iv edone now is split the code to make sure all small parts are working. So what Ive done now is: Private Sub ExitForm_Click() Dim sqlstring As String sqlstring = "UPDATE Location SET location1= " & [Forms]![View die...
  15. A

    SQL Update statement

    Has anyone any idea what is up with the following code. What I want it to do is update the record which is identified on the form by the text box called "linked". Im getting an error message saying: Run time error 3075 Syntax errot (missing operator) in query expression 'PSM Code=1000' which...
  16. A

    Group level access rights

    Ive created a group level account which prevents prohibited users from accessing database utilities which they dont have access to. Now if a user who has no write access attempts to enter a data entry form then the database crashes and the only way out is to exit the database. Im just wondeing...
  17. A

    Record check before opening report

    Thanks, the way I was thinking was far more difficult. Thanks alot Regards
  18. A

    Record check before opening report

    Hi, I have a report which is generated on a query called Tool Room. I then have a button which allows a user to simply click and print of the neccessary report. Now what Im wondering is there a way that when the user clicks on this button a check is done to see if there are any records generated...
  19. A

    DCount() problem

    Sorry its taken so long to get back but Ive had a problem with my internet. Anyway, Yes the code is changing each time (displayed through the msgbox) but Im still getting the error message. any ideas?
  20. A

    DCount() problem

    Im having a problem with the following code: Private Sub PSM_Code_BeforeUpdate(Cancel As Integer) Dim PSM As String PSM = Me.PSM_Code.Value 'Check Part table for duplicate PSM Codes If DCount("PSM_Code", "Part", "[PSM_Code]=" & "'" & PSM & "'") > 0 Then 'Message box warning of...
Back
Top Bottom