Is there any recordset action going on when it opens from the command button? What differs when it's opened via the button vs opened from the database window? If something else is going on in the process, you may wish to use DoEvents after DoCmd.OpenForm... or in the form's Open or Load event...
Anyone know about working with the mouse scroll? In a certain form, I want it to scroll a text box when it's in it. I don't want it scrolling records. I've found articles about turning the mouse scroll off, but I want to tell it work with the textbox when the textbox has the focus.
Not sure I understand clearly, but here's what I can say. Sounds like you already know how to get the 1 in query1. When you construct the textbox, use the Name property. Me.<textbox>.Name = "txtbox" & n
Also,
Me.Controls("<name>" OR index).Name = "txtbox" & n
Use DoEvents when it should update. When you work with recordsets, Access seems to like finish the recordset work before doing anything with the display. DoEvents says, "Let everything else finish before continuing."
There is a FAQ about DoEvents concerning progress bars.
Ah, I see. Select a number of random records. That may be a little more complicated. A less practical way might be to set a recordset to the file/table, then randomly go to a record (rs.Move Rnd(),1) and copy it into another recordset. This would allow a record to be repeated, however, unless...
If I understand correctly, you want to open a percentage of records from a table and assign random numbers for them. Since the first function assigns to all records, it wouldn't be useful for this. You could actually just put the code in Yadda, but, if you want SetTmpRndNbr to be able to assign...
To reference a control by variable:
Me.Controls(var)
or
Form_frmName.Controls(var)
Control properties may be used with this reference also (Me.Controls(var).Name).
You can use a similar method for referring to a form or report by variable.
CurrentProject.AllForms(var).Name...
Where is the error occurring? If it's in VB code, Debug should tell you which variable is not found. If it happens when it tries to use the SQL code, you may need to put [Forms]![Find_a_record_form]![Field12] outside the quote marks.
"bd_number=" &...
It's nothing more than that, really. Just creating table TableName from textfile FileName is all, using the specifications in SpecificationName. I had a problem with it once, so I used DoCmd.TransferDatabase. That tends to be more reliable. If TransferText is working for you (doesn't look like...
Looks to me like you have the right idea. It looks like SetValue will always be one of the four cases in the code. In that case, good. If it could be something else, you should fill in Else.
To handle events with the Cancel button, have the code put the focus somewhere else, then alter its...
Use the AfterUpdate event of the combobox to update the phone number. If the phone number is coming from a table, the best way I can think of is a recordset. You need reference Microsoft DAO 3.6 Object Library (or latest DAO Object Lib) for recordsets.
Dim rst As Recordset
Set rst =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.