Search results

  1. 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 =...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. A

    INSERT statement

    Ive got the following INSERT statement Dim SQL As String Private Sub Save_Click() [Forms]![Entry settings]![PSM Code] = [Forms]![New Part settings]![PSMCode] [Forms]![Entry settings]![PSM Code].SetFocus SQL = "INSERT INTO Part(PSM Code, Part Prefix, Part Base, Part Suffix, Part Description...
  7. A

    User rights

    Has anyone got an idea on how to issue user rights i.e. one person can write to a certain table whilst another can only read the same table. Ive had a good search but unable to find anything! If anyone has a good thread or website I would be most grateful!
  8. A

    Inserting new values into a combo box

    Hi, I have a form which has a combo box on it whose rowsource is a table i.e. the source code of the combo box is SELECT [LineTable].[Line number] FROM LineTable This will give me all values already stored in the Line Table. However because I want to produce a query from the value stored here...
  9. A

    Form criteria using a list box

    Hi, I have a table called tblSettings which has the primary keys Line number and Part number Now I want to produce a list box which matches a certain critera (which Ive managed to do!). However I want to be able to click on the tuple from the list which inturn opens the details corresponding...
  10. A

    If statement

    I previously produced a tick box in a form with the use of a Yes/No data type. However i wanted to produce code that display a number of objects if the the box is ticked. Hence I produced the following code Private Sub Partsseperate6_AfterUpdate() If Partsseperate6 = True Then...
  11. A

    Changes from a combo box

    I owe this forum my life! I have a combo box with no default value i.e. there is no value in the combo box when the form is loaded. When the combo box is updated from one certain value to another I want to make the neccessary changes. However if the box is changed from another value to a...
  12. A

    Message box error

    In a form Ive created I have data entry field that prompts the user to enter a figure which we will call tonnage. I then using the below code check to see if this number is valid i.e. whether it is above the recommended tonnage Private Sub Tonnage2_BeforeUpdate(Cancel As Integer) Recommended2 =...
  13. A

    Refreshing a data entry form after saving data

    This has most definitely been asked before but I really cant find anything on the forum! Ive created a data entry form which has a save button which the user must click each time to save the record. However how do I refresh the form i.e. empty all data from the previous record without exiting...
  14. A

    Moving an object

    Im wondering if anyone has any ideas. I have a field which declares an integer call it Presses. If Presses is equal to five I want to be able to move a text box to a different location i.e. More up the page. At the moment i am looking at the code; If Me.Presses = "5" Then Me.Text5.Top...
  15. A

    VBA help

    Just wondering if anyone can help! I have the following code; Private Sub Tonnage6_AfterUpdate() If Tonnage6.Value > Press6Max.Value Then Dim bytResponse As Byte bytResponse = MsgBox("The tonnage exceeds the maximum allowed. Do you wish to continue", vbYesNo, "Exceeded tonnage") If...
  16. A

    Sum help

    Apoligies for this rather frivilous question but IM getting really annoyed with this and I have attempted to serach the forum! I have four fields Outer1, Outer2, Outer 3 and Outer4 and I want to get the total of the four fields in a new field called total outer. However I want the user to be...
  17. A

    Conditions

    Hi, I have created a Yes/No attribute. Im just wondering if a text boxes visibility can be dependent on the result of this. E.g. If a row is set to yes then the text box will be shown and if it is set to no the text box is made invisible. Thanks for any help
  18. A

    Cascading combo boxes

    Just wondering if anyone can help Im creating two combo boxes where the first one determines the values in the second one. The tables are made up of the following; Line Line number (PK) ..... .... Main Setting Part Number (PK) Press Line (FK) Now ive took the advice of previous threads...
  19. A

    Lookup and seearch

    Hi just wondering if anyone can help Im wanting to create a query that uses a drop down menu. E.g. If i have a table of teachers which i must pick one then the system will return a list of school children. Any links to releveant examples would be extremely useful
  20. A

    Form design

    Just wondering if any one can help. Ive create a table of parts, and each part has a home line. Now the problem is each home line has different characheristics. So im wondering is there a piece of code that will prompt the user to enter a part number (through a query I know!) and then depending...
Back
Top Bottom