Search results

  1. S

    Cascading Combo Boxes

    Just a word of advice, if the fields are linked in the database, a very simple and easy solution is to use a subform with master/child fields designated in the form properties. Access will then do all the coding for you :D http://fisher.osu.edu/~muhanna_1/837/MSAccess/tutorials/subforms.pdf...
  2. S

    VBA Copy primary Key to table when a button is clicked

    You might want to look into recordsets, if youre not using them already. I only mention this because you claim you are new to VBA. A Recordset will contain whichever data you choose from a table, via SQL. Create one for each table. When you click the button to create a new table on the...
  3. S

    Runtime error 3615

    might want to click debug when you get the error message and give us the exact line where the error is occuring. Also, just want to give you a friendly reminder that this is primarily an access forum, although your questions are always welcome you may find more results on an excel forum.
  4. S

    Noob need help using VBA to create query and report

    1. Yes, you can modify reports with VBA the same way you can modify forms. 2. Not Sure I understand what youre asking. Ill just leave this for now. 3. Since SQL source must be input as a string in VBA: "INSERT INTO [TBL_" & prs & "] ( JohnDoe_field, Personal_Info, Gender, Age)"
  5. S

    Need help with simple VBA.

    A simple if statement should suffice, if i am understanding your problem correctly. If Not IsNull(yourComboBox.Value) Then 'Execute Some Code Here End If *EDIT* just noticed. as a general helpful hint. you should get into the habit of using .value when sending data from a combo box or a list...
  6. S

    Custom UserForm Question

    http://spreadsheetpage.com/index.php/site/tip/creating_a_userform_programmatically/ I know this is an excel solution, but ill dump it here anyways, since it diretly relates to my question, and i do appologise in advance if i break any rules :(. I find it bizzare that excel supports something...
  7. S

    Custom UserForm Question

    Noted. Will post with the results of my experiment. Thanks!
  8. S

    Custom UserForm Question

    Hello again all! I am currently working on designing a custom userform for my database. I found the following code and am working on converting it to work properly in Access. It is current aimed to work in Excel. Option Compare Database Option Explicit 'Passed back to the function from the...
  9. S

    Events Question

    Brilliant mark, but that only seems to work in one direction! As soon as i delete an item, the event stops working altogether, i am currently fiddling with this code trying to get it to co-operate, but this certiainly seems a step in the right direction! Kudos! P.S. While we are on this topic...
  10. S

    Returning the results of a public function

    Unless you are going for an encapsulated solution, you could declare the variables outside the function as a quick fix. Then just call the function on form load. After that, just set the values of the text fields = whichever variable. if youre looking for a return feature. Other than that, you...
  11. S

    Events Question

    Thanks for the reply. I am trying to run this event for every new character the user enters into the text field. For example: type s - search would return sam type y - search now returns synergy delete y - search returns sam again i thought the key press would be the correct event for...
  12. S

    Events Question

    General question about how to get an event to work. I have the following simple code. If RegexMatch(Me.txtSearch.Value) Then rstReportGenerator.MoveFirst rstReportGenerator.Find "partNumber >= #" & Me.txtSearch.Value & "#" If rstReportGenerator.EOF Then...
  13. S

    recordset filtering

    Thanks again for the help. Much appreciated! *EDIT* worked like a charm. and now i feel stupid for leaving out the .value property :P
  14. S

    recordset filtering

    Well the if statement comeplete does not work. When a breakpoint is inserted, both fields show an equal value, but there is no descention into the if statment. It SHOULD be a fairly simple if statement, but there is no functionality out of it at all! For the second, my SQL setup is producing a...
  15. S

    recordset filtering

    Thought id update. Ive attempted this rstBoiler.Open "SELECT * FROM boilerDetail WHERE boilerDetail.boilerNumber = '" & Me.lstBoilers & "'", dbBoiler, adOpenKeyset, adLockOptimistic, adCmdText As well as using the .filter property to construct an expression. Any ideas?
  16. S

    recordset filtering

    Hello I am trying to filter my recordset based on a selection in a list box on my form. My original idea is For loopCounter = 1 To rstBoiler.RecordCount If rstBoiler!boilerNumber = Me.lstBoiler Then I Will be executing code here. End If...
  17. S

    Picking out a specific record in VBA

    Dim someVariableName as new ADODB.Connection Dim someVariableName2 as new ADODB.Recordset On form load: set someVariableName = currentproject.connection somevariablename2.open "Select * from yourTable", someVariableName, adOpenKeyset, adLockOptimistic, adCmdText Now in order for this to work...
  18. S

    Recordset error

    Been banging my head off a relatively simple problem for hours. any help would be appreciated. the following is my code: Now the problem. the readVendor event works fine on formload, but on the click event it produces an error 3021: either BOF or EOF or recordset deleted? Ideas? Thanks in advance
Back
Top Bottom