PDA

View Full Version : MS Access stuf


jes
01-13-2003, 03:36 PM
When you make a project in Access you can put a shortcut to it on your desktop. When you double click on that shortcut, you get a menu where you can choose which table, query, report... Is there a way to have it so the menu is bypassed and it just goes straight to a certain table?

Paul Komski
01-13-2003, 06:33 PM
Jes; there may be a way with a command line switch - but which version of Access are you using; sounds like OfficeXP, which I am not over-familiar with.

If you always want to open the same item then there are two ways of doing it from within Access. First is to alter the configuration for the StartUp Options (Tools<>Startup) to open a specific form and the second is to create an autoexec macro or module that will open a table, form, report, etc. at runtime.

;)

jes
01-14-2003, 02:05 PM
it is Access 2000.
The macro tecnique works but I would still have to go into Tools - Startup and tell it to start with the macro that starts my phone book(PB) so I want to just skip that step and tell Access to open with the table called PB. I am not sure how to do this. Tools - Startup opens a confusing window. What do I have to enter?

Paul Komski
01-14-2003, 05:08 PM
The startup options can be used to display a form and not a table. One might use this to create a customised form as "splash screen", while the other objects were being loaded, etc, etc.

Open a new Macro.
In the Action Column Choose OpenTable.
In the dropdown list for Table Name under "Action Arguments" select the table you want.
Save the macro with exactly the name autoexec
Close the project or mdb; the next time it should open that table at startup.

If you want the table in a specific view etc, then choose them from the "Action Arguments" at the bottom.

If you want the table opened maximised then in a second action line under OpenTable choose maximise.

Using a macro is the easiest way to go. You can also do this from a module but it is more complicated.

To avoid opening to the settings set in the autoexec macro just hold down the shift key, when you open the project/database, and it should open normally.

aussieolie2
01-14-2003, 06:27 PM
This could be of good use to you. It covers all the shortcut switches you can use to force Access to do something:
http://support.microsoft.com/default.aspx?scid=kb;en-us;209207

Olie

jes
01-14-2003, 06:27 PM
Perfect! Thanks so much.

jes
01-14-2003, 10:43 PM
In the Database function of MS Works there was a function in "Tools" that allowed your modem to dial the number highlighted. This is useful because it provids you with and unlimited database of speedial if your phone is pluged into your modem.
Is there a similar function in Access 2000?

Paul Komski
01-14-2003, 11:41 PM
A. You can get a custom icon and place it on a toolbar.

Have Microsoft Access automatically dial a selected phone number

You must have a working Hayes or Hayes-compatible modem to use this procedure.

1) Open a table or form in Datasheet view or a form in Form view.
2) On the View menu, point to Toolbars, and then click Customize.
3) Click the Commands tab in the Customize dialog box.
4) Click Records in the Categories list.
5) Drag AutoDialer to the Form view or Datasheet view toolbar, or to a custom toolbar.

6) Click Close.
7) In the form or datasheet, select the phone number you want to dial.
8) Click AutoDialer on the toolbar.
9) Check to see that the phone number is entered correctly, and then click OK.

Note You can change your modem options by clicking Setup in the AutoDialer dialog box.

B. Or you can create your own command button (called phonedialer here) and use the following as an on click event just substituting the correct control name for TelNumberField

Private Sub phonedialer_Click()
On Error GoTo Err_phonedialer_Click

Dim stDialStr As String

If IsNull(Me![TelNumberField]) Or Me![TelNumberField] = "" Then
MsgBox "No contact selected or the contact has no tel no."
Exit Sub
End If

stDialStr = Me![TelNumberField]

Const ERR_OBJNOTEXIST = 2467
Const ERR_OBJNOTSET = 91

Application.Run "utility.wlib_AutoDial", stDialStr

Exit_phonedialer_Click:
Exit Sub

Err_phonedialer_Click:
If (Err = ERR_OBJNOTEXIST) Or (Err = ERR_OBJNOTSET) Then
Resume Next
End If
MsgBox Err.Description
Resume Exit_phonedialer_Click

End Sub

jes
01-15-2003, 11:46 AM
But this method only works for one phone number? Oh well, you can't win 'em all. Thanks anyway.

Paul Komski
01-15-2003, 02:15 PM
You have to first select/"give the focus to" the entry that you wish to dial - there can be any quantity of telephone numbers in the particular field in question.

;)

jes
01-15-2003, 07:16 PM
How do you know that you have a Hays compatible modem?

Paul Komski
01-17-2003, 07:08 PM
A Hayes compatible modem is able to recognise the AT-set language. You can test your modem with hyperterminal (or bring up a pre-dial terminal screen from DUN). Type AT and if you get an OK response it is a Hayes compatible.

jes
01-17-2003, 10:47 PM
I start Hyperterminal and it asks me to enter a name for the connection. So I do (just make something up...) Then it ask for an area code and phone number...then it wants to dial the number... I am probably doing something wrong. What do I have to do to get to the point were I type "AT"?

Paul Komski
01-17-2003, 11:34 PM
You dont want to be on line or using your modem for something else.

1)Start hyperterminal.
2)Click the cancel button on the connection description dialog box.
3)From the File menu choose Properties, which should open the New Connection Properties dialog box.
4)Select your COM port from the Connect Using Drop Down List.
5)Click OK and you should be at the Terminal Window, which should now accept your AT commands.

With a hardware modem you can dial your ISP's number using hyperterminal and then click cancel. Since the modem should now be in command mode it should accept AT commands. Don't think this will work with winmodems. However you should be able to type the AT commands from the terminal window by enabling "Bring up terminal window before dialing" under the DUN settings with both soft and hard (Hayes Compatible) modems.

jes
01-18-2003, 01:51 PM
I have tried those instructions and cannot type anything into the HT window. I am not sure what Com port my modem uses but I have tried Com 1 and 4. I am using Win98 SE so I though that System Information would tell me what the Com port is, but no. How do I tell?

Paul Komski
01-19-2003, 04:03 PM
If you are using a "software/internal/56K/winmodem" then it is likely to be on COM3 or 4. Check the modem's configuration in Control Panel.

With software modems it is more reliable to use the DUN terminal window for these AT commands.

RClick on your DialUpNetworking Icon and select Properties. Then find and enable the check box for "Bring up terminal window before dialing" or words to that effect. When you next dial-up this terminal window should pop up before allowing the dialing to proceed.

This is a good security measure to use in any case since it inhibits malware from dialing-up using your DUN since you have to click on a box to allow the dial up to proceed.