I am using the same view (for 140 individual tables) across multiple copies of the same database (each with different names on 6 different servers). I need a way to generically reference a server and/or database name within a view. I am open to any technique that will work within a view and...
Here are a couple of ideas:
1. Time-out (close) the application after a specific time period (5 minutes?).
2. Dynamically link the table at run time, read the data into a local table, and drop the link.
a. This works well for read-only data but requires more work for updates (similar to...
Hi AJwebb,
One way to do this is to leave the second list box's ControlSource property blank and populate its value immediately after requerying the first list box.
In your case, all bound form objects (including the form itself) are requeried when you open the form. In the OnLoad form event...
It is possible to have one query update another query. This is the same thing as telling a dumb friend to paint your house instead of you doing it yourself.
A SELECT query is really just a view of a table (when you open a table, an implicit SELECT query returns the data to you). When setting...
Paste the following function in a module (new or existing).
Function ParseValue(varValue)
Dim intCtr As Integer
Dim intMax As Integer
Dim strValue As String
If IsNull(varValue) Or Len(varValue) = 0 Then
MsgBox "Passed value is empty", vbExclamation...
Assuming that the Name column is unique in both tables, you can accomplish this by creating 3 action queries.
Query #1: Delete all unmatched Unit To Do List rows.
DELETE * FROM [Unit To Do List]
WHERE Name NOT IN (SELECT Name FROM Temp);
Query #2: Update Temp/Unit To Do List matched row...
Interesting question. If I understand correctly, you want to be able to handle multiple, independent checkbox values on a form.
Try coding a module-level subroutine that is called by each Click event. Pass the currently active control object to the function and use a SELECT CASE statement to...
Instead of using the dot "." syntax to reference control information (an Access 97+ NO-NO, BTW!), try using the bang "!" syntax.
BEFORE:
Me.Payments.Visible = bolAdminUser
Me.Receivables.Visible = bolAdminUser
Me.Dues.Visible = bolAdminUser
Me.MergeTo.Visible =...
Sorry about the bolProceed question--I didn't see that you were setting it to true!!! Jim Kraxberger
Developing Access solutions since 1995
jkraxberger@scp4me.com
Are you expecting code execution to stop while the user is entering data in the filter form?
DoCmd.OpenForm "ContactsFilterSortForm", , , , , acDialog
If so, you need to check if the form is still open with a Do While...Loop:
DoCmd.OpenForm...
Your popup form must be somehow forcing a requery of the subform's underlying data.
Here is a way to reposition in Access 2K:
'in your subform's double-click event
Dim varBookmark As Variant
varBookmark = Me.Bookmark
'your popup form logic goes here
Me.Bookmark =...
If you use the MouseMove event of either a "freestanding" label (one not connected to a textbox) or the textbox that has a connected label, you can set the label's ForeColor property.
To change it back to the orginal vbBlack (or other color), you will need to create a option group...
Copying files to CDR automatically flags each file as read-only. You need to remove the file's Read-only Attribute property after copying to the hard drive.
This can be done via:
1. Windows Explorer/My Computer (find the file, right-mouse click to select Properties, and uncheck the Read-only...
If you are using DoCmd.OpenForm, you can use the OpenArgs paramater to pass a formatted string containing the field name and value:
strValues = "ID=42|Name=Fred Flintstone"
DoCmd.OpenForm "frmCustProf",,,,,,strValues
...
'frmCustProf code module
Dim...
Unfortunately, you cannot automatically filter a subform via the DoCmd.OpenForm statement, but you can accomplish the same thing a couple of ways:
1. In the Form_Load event, apply a constant-valued subform filter based.
Me!subformcontrolname.Form.Filter = "[v_id_num]=" &...
Chris,
You probably need to use a SELECT CASE statement to properly format the fields every time the employee changes:
Sub Form_Current()
Dim intDay As Integer
Dim intHrs As Integer
'Format each employee's daily work hours
For intDay = 1 To 7
'Determine hours by day...
Here are two VBA module-based approaches:
1. Pass a reference to the current form:
'In your form's OnLoad event:
Call ClearAllByForm(Me)
'In a global module somewhere...
Public Sub ClearAllByForm(frm as Form)
Dim ctl As Control
'Is Form Open?
If...
Try the following: (Access 97+)
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 0 Then
MsgBox "Form is open"
Else
MsgBox "Form is closed"
End If
where strFormName = your requested form's name Jim Kraxberger
Developing Access solutions since 1995
A couple of ways:
1. Set the Default Value property of the form's underlying RecordSource table columns = 8
2. Set each control's Default Value property = 8.
3. Run the following code:
Function x()
On Error Resume Next
Dim ctl As Control
For Each ctl In...
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.