Lots of times, the underlying box is based on a table. If it is, you can simply use a Dlookup function to set the value in the form's Load Event.
Me.MyComboBox = DLookup("[THIS_FIELD]","IN_THIS_TABLE",[THIS_FIELD] is not null")
You can also experiment with...
MS Access 2000 running on 2000-Pro, XP-Pro & XP-Home (Same issue on all platforms)
DoCmd.Hourglass True isnt' working on a form.
The VBA code for the form is a little on the "Overly-massive" side to post here, but the highlights are:
- Timer Event running (TimerInterval set to 5 min)
-...
If rst.RecordCount = 0 Then
MsgBox "No Records, so quit"
Exit Sub
End If
rst.MoveFirst
Do While Not rst.EOF
...
(do your stuff here)
...
rst.MoveNext
Loop
Alan J. Volkert
Fleet Services
GE Commercial Finance Capital Solutions
(World's longest company title)
Eden Prairie, MN
You might try doing this programatically ... the subform totals (i.e. =sum[MyField]) only work on straight data ... as far as I know.
You can't, for example, have a field with a calculation in it and then total that field in the subform.
Example: You can total UNITS_ORDERED, but you can't...
#1 Be wary of having to rely on controls and tools that may (obviously) not be standard in your environment. You'll have to distribute and install and maintain all of that.
#2 The FileSearch object is very useful ... but it can really slow things down ... it's not too bad if you can count on...
SYNPERX3 has a good question/suggestion.
I'm inclined to suggest, depending on what the form is doing and when, that you might want to examine the form's ON CURRENT property.
Esentially, that property (code attached, of course) runs whenever the record changes.
I don't know ... this is a...
For the TEXT boxes, you have two events that you might consider using. They are the ON ENTER and ON EXIT events.
Example:
On a form, you have an OPTION FRAME (buttons, checkboxes, whatever) named OPTION_BOX and it has two choices.
OPTION_BOX
+-----------------------+
| O Box 1 was selected...
Wow, Kuddo's to MajP ! ;-)
Aside from the technical aspects of speed (measured in nano-seconds) ... let's not overly confuse the issue here. Efficiency is all about OVERALL Efficiency.
Example: How many times have we all had to adjust or modify someone else's code or even our own after...
There are lots of ways of doing this stuff. One is to flag the outlier based on the the number of Standard Deviations it is away from the mean. In the example below, I used 1.5 Standard Deviations ...
You can cut and paste this code as a new little program, run it step by step and see the...
Try Linking the form to the master with an invisible text box. Before updating the child (i.e. when you know what record you're on, stick a value of a unique field in that record into an invisible text box on both the child and master. When the form is rebuilt, it should jump to that record...
Looks to me like you're confusing Double Quotes with Single quotes. VBA recognizes double quotes around text strings (single quotes are enclosed in the text string) and work just fine in SQL.
Dim MYSQL as String
MYSQL = "select COMPANY, COMPANY_ADDR from MYCORPTABLE where (COMPANY_CODE = '" &...
Well, you could just start typing it. If the object exists on the form VB will recognize it. But then again, what did you expect from Billy-Boy ? ;-)
Alan J. Volkert
Fleet Services
GE Commercial Finance Capital Solutions
(World's longest company title)
Eden Prairie, MN
I'm in the same boat. If you go to the Microsoft site, it's a problem with VB6E.DLL ... essentially, you CANNOT import a form or module with code associated with it. There is no successful workaround. Microsoft claims that SP3 should fix it, but it doesn't. Their suggestion ? "Revert to a...
You can try using DDE to both send and get data ... this example sends data to Excel --
Private Sub XLS_TOOL(XLSFILE As String)
Shell "C:\Program Files\Microsoft Office\Office\excel.exe" & _
" " & Chr(34) & _
XLSFILE & _
Chr(34), vbMaximizedFocus
DoEvents...
Compacting is very important -- Especially with larger databases. Access NEVER deletes anything, only the record pointer. In otherwords, try this: Make a little-bitty database and close it. Look at the file size. Then load a boat-load of data into it and close it again. Note the huge file...
Look at the form's On_Current event and do a me.Repaint or me.Requery ... It may solve your problem.
Alan J. Volkert
Fleet Services
GE Commercial Finance Capital Solutions
(World's longest company title)
Eden Prairie, MN
#1: Turn off the wizard (the little majic wand thing). When it's on and you select Build Event, Access guesses at what you want to do.
#2: When the wizard is off, you should right click on the control and view properties, then "build" with the "..." button in the event you want...
You can't do this. The last increment of the Autonumber field is stored with the table. The only way to reset the autonumber is to use VB to do so, but then, what was once a 2 may end up being a 17 or vice versa.
Bottom Line: You should not use autonumbers. They not worth the hassle. I...
Thank you, Thank you, Thank you ... The answer worked wonderfully.
FYI though ... you can't switch the current form's view in the middle of VB code (fine, this is the update form anyway).
This works wonderfully and very fast too:
For Each FRM In Application.CurrentProject.AllForms
If...
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.