Not all database types are installed by default. To add new db types run the Setup program for your version of Access. This information is located at the bottom of the import or link dialog box just below the "files of type" pull-down box.
PaulBasel
Why not just show the hyperlink in a field on the form? If the field is empty then obviously there is no document to link to. If you do want a box turning color try this:
Private Sub Form_Current()
Dim RED, BLUE
Dim MyObject
Set MyObject = Me!Box0
RED = RGB(255, 0, 0) ' Return the value for...
I may be missing something, but why not just have your command button create a new record in the subform and set the focus to the new record row. To ensure that the user enters a primary key value, just use a error dialog in the subform BeforeUpdate event informing them that this is a required...
If you are going to be writing VBA code, I strongly urge you to learn how to debug your code. Look in the Access Help menu under "debugging code - how to". It will make your life a lot easier and you will learn how to write cleaner, more efficient code.
PaulBasel
In a continuous form, Access has just one set of control properties for all the records displayed. This means that changes to any control's property will affect all records.
However, Dev Ashish has posted on his web site, The Access Web, one possible solution that may help you. You can find...
Set a breakpoint on the first line of your code and then run it, toggling each line to see which is the offending line of code in your routine.
paulbasel
In the OnClick event of button on the main_form:
DoCmd.Minimize
DoCmd.OpenForm "Form2"
In the OnClose event of Form2:
Forms!main_form.SetFocus
DoCmd.Restore
I hope this is what you wanted.
PaulBasel
Is the question ID on the same form that you are opening or on a separate form? If on the same form, does the user select a question from a combobox? Need more info.
PaulBasel
kwill
Sorry, I hit the submit button too fast.
The strFld has to be the underlying field that the button is to sort.
Call ChangeSortOrder(Me, "MyFieldName")
Paul
I use the following function in a form module:
Public Sub ChangeSortOrder(frm As Form, strFld As String)
On Error GoTo ErrHand
If frm.OrderBy = strFld Then
frm.OrderBy = strFld & " DESC"
Else
frm.OrderBy = strFld
End If
frm.OrderByOn = True
ExitProc...
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.