Search results

  1. Rakier

    Vba?

    My guess is that you named the module ConfirmEdit as well as naming the sub ConfirmEdit. When you call a module you do it in this format: Call MODULENAME.SUBNAME (arguments) To call the ConfirmEdit sub in the ConfirmEdit module you have to code it as: Call ConfirmEdit.ConfirmEdit Typing...
  2. Rakier

    help please

    Did you try to compact and repair the dB?
  3. Rakier

    Possible to open form in Add mode using VBA??

    You can also open the form in Add mode. That will let you just add a new record. Instead of DoCmd.OpenForm "FormName" Use DoCmd.OpenForm "FormName", , , , acFormAdd HTH
  4. Rakier

    active x!!

    Kinda on the same subject. When programming using these Active X controls, where can you get information regarding the properties and methods for those controls?
  5. Rakier

    suppress error messages

    I believe you will have to use error trapping to suppress that error.
  6. Rakier

    problem with MS Access

    Could this be a problem with security settings on your browser? Not sure, but I have had problems accessing sites due to security settings on my browser before.
  7. Rakier

    background colour of messagebox

    You can simply reuse the message form by creating the buttons you will need for it and then coding the On-Click event to perform different functions based on a hidden text field. When you call the message form, you will need to specify the information you need. For example, let's say you need...
  8. Rakier

    Text Box Question

    This code may work for what you need to do: Dim stFreightCode as String stFreightCode = DLookup ("[FreightCode]","tblModels","[Model]=me.ComboBox2") TextBox = Dlookup ("[FreightCode]","tblFreight","[FreightCode]=stFreightCode") In the first line, [FreightCode] is the field name from the...
  9. Rakier

    911 the strangest thing happening

    This has happened to me before also. For some reason, the command button becomes disassociated with the VBA code for it (or at least that's what's happened to me). Open the form in design view and go to the properties of the offending command button. Click on the event (I'm assuming On Click)...
  10. Rakier

    Is this a trappable error?

    I too have received that message, but also when editing the design of a table. It won't save my design changes. It really is an irritating message. Doc_Man... I know that it is happening when noone else is using the dB because it has happened on a development database that noone else has...
  11. Rakier

    auto fill in field

    You can use the DLookup function (like in Mile-O-Phile's post) and put it in the AfterUpdate event of the field where you select the Payroll Code. That is assuming that you want to populate these other fields with information generated from that payroll code. Use 1 DLookup function for each...
  12. Rakier

    Lots of queries - One form

    I'm not sure how to set the control source of a textbox to the results of a query, but what you could do is use the DLookup function for each text box to find what you need. Example txtBox1 = Dlookup("FieldNameInQuery","QueryName") txtBox2 = DLookup("FieldNameInQuery2","queryName2") Then do...
  13. Rakier

    Lots of queries - One form

    Another possibility is that your queries are returning more then one value which can't be represented in a text box. You may be able to do this using multiple combo or list boxes instead of text boxes and then setting the rowsource for each one in the on-click event for the command button that...
  14. Rakier

    Cant delete from list box

    Another bit of screwy code that is generated by a wizard is when you create a button to open a form and show all values. The wizard adds a DIM stLinkCriteria line to the code and adds the stLinkCriteria to the DoCmd.Openform command. I always go in an delete this code because it is never...
  15. Rakier

    a2000 - deleting record from form - command button

    Also, make sure that you are on the record that you want to delete. This code will select the current record and then delete it. It should work as given as long as it's in the click event of the delete button and you are on a specific record.
  16. Rakier

    De-Select ListBox item

    You can set the value of the listbox to an empty string. That will clear the value. me.YourListBoxName.value = "" That should work. HTH
  17. Rakier

    Still looking for help writing to a table

    You should use the "Dim" line to declare the variable. You will need to add the proper reference like BukHix said. If you do not declare the variable (which by eliminating the line of code, you will not) then Access sees this as an undeclared variable and assigns the datatype of variant to it...
  18. Rakier

    Still looking for help writing to a table

    You can use code to do that in this way: Dim MyRst As DAO.Recordset Set MyRst = CurrentDb.OpenRecordset("ECRLog", dbOpenDynaset) With MyRst .AddNew !YOURTABLESFIELDNAME = Me.Originator .Update End With MyRst.Close Set MyRst = Nothing...
  19. Rakier

    Random

    That code will generate the random number that you need, but you will have to do some validation as you do not want it to be the same as any other number in the record. When the random number is produced, you will need to check it against the other numbers in the record, then if it matches one...
  20. Rakier

    Too many Queries...

    I use the properties of the query (right click the query icon for the query you want to set the properties of) to set a description to group them. When you view the info in the access window, you can then sort them by the description rather than the query name. You have to be viewing icons by...
Back
Top Bottom