Search results

  1. S

    Syntax Errors - Apostrophe in field value

    Hi all, If a field value contains an apostrophe (') eg "Bob's Factory" - when performing a lookup (and I would assume when using any SQL) a syntax error is generated. Just wandering whether there is a way you can work around this in your code - or some type of global function that can be...
  2. S

    2003 backwards compatibility with 2000

    Hi all, I am developing in Access 2003 - while my end users are mainly on Access 2000 with Windows NT. While I have tried to ensure no problems as a result of this - I have today experienced my first problem in that the '.additem' method does not seem to be backwards compatible. Can anyone...
  3. S

    Data type mismatch error

    Hi all, Rod - Thanks again. Concatenating fixed it up nicely and it now works a treat. Namliam - Thanks for the advice. I had not considered using recordset to get at the query - it does make sense though so I will give it a whirl! To explain this - If Me.txtchqstring.Value =...
  4. S

    Data type mismatch error

    Hi all, Sorry to post again...I need some advice! I have made a function to check a query (based on a LINKED table) to see if a value exists. I am getting the 'Data type mismatch' error when running the code - Private Sub cmdFind_Click() Dim ChqString As String Dim Acc As String Dim BSB As...
  5. S

    Remove combobox values

    Thanks Rod! Worked like a charm :)
  6. S

    Remove combobox values

    Hi all, I have two linked combobox objects on my form - that are not based on query/table data. The values are populated using VBA. So if CBO1 Option 1 is selected, I use '.additem' to load the relevant values into CBO2 - and so on for the other options. Using this works - but of course when...
  7. S

    Can you update a table value based on query?

    Thanks MStef...just dropped back in to say I found out how to do it..... I did search the forums and google prior to posting...but as usual my search terms let me down :( Thanks Rob
  8. S

    Can you update a table value based on query?

    Hi all, Simple question...I think. Is it possible to update values in a table, based on the results of a query? For example, I have tblPRR and qryProcessed. When I run qryProcessed, I would like the field "Status" in 'tblPRR' to update from 'No' to 'Yes'. Could anyone advise if this is...
  9. S

    Fun with subform defaultview

    Hey Rural Guy, Basically, I want the subform to always default to 'Form' view. I have set the properties of the subform - so that only form view is allowed. However, when the mainform is started, the subform always defaults to datasheet view. Cheers Rob
  10. S

    Complicated? Problem with query...

    Hi Query Nuts.... I need your help! This may get a little complicated...I suppose I should give some background so that it may be easier to comment on whether I have the correct approach.... My DB consists of 3 tables setup to capture customer complaints - tblEnquries tblCustomers...
  11. S

    Fun with subform defaultview

    Hi there, I am having a frustrating time trying to set the defaultview for a subform to 'Form' view. When I try to set the defaultview I get a runtime 2136 error - as this has to be done from design view. So on the mainform I have set a 'Form Load' event that attempts to open the subform in...
  12. S

    Update form objects based on subform values

    Hi there, I have a form that contains customer details. A search can also be performed - and if the customer exists the details show up in a subform (based on a query). I then have buttons to either select the customer from the query, or create a new customer. Is it possible, that when the...
  13. S

    Simple question - Select/Edit Record with vba

    Got it! I am using Dim strSQL As String strSQL = "UPDATE tblEnquiries SET Category =" & Chr(34) & Me.cboCategory.Value & Chr(34) strSQL = strSQL & " WHERE ID = " & Me.txtAns.Value & ";" CurrentDb.Execute strSQL strSQL = "UPDATE tblEnquiries SET Type =" & Chr(34) & Me.cboType.Value & Chr(34)...
  14. S

    Create Reference Number

    Thank you all for the help! I used the function and it worked perfectly for me. I realise I still have one heck of a lot to learn - in terms of making coding tidier. I still do not have my head around using SQL in vba - I have not got much further than using a DLOOKUP function in my login...
  15. S

    Simple question - Select/Edit Record with vba

    Hi all, I have tried to find the solution for this on the site...not sure if I am searching for the right terms though as I cannot seem to locate what I need. I was hoping someone could help me out. :) I am trying to select a record where the the field 'ID' equals 'Me.txtans.Value' and update...
  16. S

    Create Reference Number

    Hi, I am using the following - ChkDgt = DMax("ID", "tblEnquiries") To return the most current record...as it is an autonumber I figure this should always work. I'm sure this is'nt the best way though...so if someone can suggest another method I would be greatful. Thanks Rob
  17. S

    Create Reference Number

    Thanks Paul. I have actually taken this on a bit of a tangent having found a more suitable option. I now only need to return the autonumber for the relevant row as my complaints reference number. I'm hoping someone can help me with the code below - Private Sub cmd_Generate_Click() Dim...
  18. S

    Create Reference Number

    Quite pleased with myself.....I have managed to figure it out...well almost. At this stage I have access returning a message box value (have not worked on creating a record, writing values to forms, etc - but should be easy enough). Here is my rather simple code... Private Sub...
  19. S

    Create Reference Number

    Hi all, I'm hoping someone can point me in the right direction with a query. I am currently developing a database to capture customer complaints. At the moment - the complaint is assigned an autonumber - which works well enough but I was wandering if it is possible to change this. I would like...
  20. S

    3D Database Concept

    Thank you all for your feedback. I appreciate the insight...and yes, realise I still know very little about the whole area! I'm interested to read and learn more...so will check out some of the mentioned products. Thanks Rob
Back
Top Bottom