Boat Drinks  

Go Back   Boat Drinks > General > Computer and Consoles

Reply
 
Thread Tools Display Modes
Old 05-03-2009, 11:53   #1
Dymetrie
A large glass of Merlot
 
Dymetrie's Avatar
 
Join Date: Jun 2006
Location: Letchworth with a Lightsaber
Posts: 5,819
Default Access DB - Make me look like a fool!

AAAARGH!

Slightly stuck with an Access DB, on something that I know how to do and have done before but now can't figure out...

Does anyone know how I make a form open with a new record rather than at 'record 1'?

It's really getting on my nerves now

Thanks in advance to whomever it is that makes me look like a fool

Dym
__________________

Khef, Ka and Ka-Tet....
Dymetrie is offline   Reply With Quote
Old 05-03-2009, 14:14   #2
Feek
ex SAS
 
Feek's Avatar
 
Join Date: Jun 2006
Location: JO01ou
Posts: 10,062
Default

My DBA said "Open it as an insert rather than a query"

Then he said "Tell him GIYF, that's a stupid question"
__________________
Feek is offline   Reply With Quote
Old 05-03-2009, 14:36   #3
Dymetrie
A large glass of Merlot
 
Dymetrie's Avatar
 
Join Date: Jun 2006
Location: Letchworth with a Lightsaber
Posts: 5,819
Default

It's not opening as a query, the command link merely opens the form...

The other DB I have opens as a new record, but despite trying to figure out what's different between the two I'm stumped :/

I am also stumped by that acronym
__________________

Khef, Ka and Ka-Tet....
Dymetrie is offline   Reply With Quote
Old 05-03-2009, 14:43   #4
Burble
Rocket Fuel
 
Burble's Avatar
 
Join Date: Jul 2006
Posts: 7,826
Default

Quote:
Originally Posted by Dymetrie View Post
I am also stumped by that acronym
GIYF = Google Is Your Friend.

I'm very very rusty with Access but am sure I've done this before. Lemme see if I still have copies of the old stuff.
Burble is offline   Reply With Quote
Old 05-03-2009, 14:42   #5
Dymetrie
A large glass of Merlot
 
Dymetrie's Avatar
 
Join Date: Jun 2006
Location: Letchworth with a Lightsaber
Posts: 5,819
Default

If it's any help, this is the VB code...

Code:
Private Sub Visit_Logging_Click()
On Error GoTo Err_Visit_Logging_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Visits"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Visit_Logging_Click:
    Exit Sub

Err_Visit_Logging_Click:
    MsgBox Err.Description
    Resume Exit_Visit_Logging_Click
__________________

Khef, Ka and Ka-Tet....
Dymetrie is offline   Reply With Quote
Old 05-03-2009, 15:58   #6
Dymetrie
A large glass of Merlot
 
Dymetrie's Avatar
 
Join Date: Jun 2006
Location: Letchworth with a Lightsaber
Posts: 5,819
Default

Ok, so the DB which does work has a macro to create a new record, I just can't figure out where it kicks in...

This is most perturbing now
__________________

Khef, Ka and Ka-Tet....
Dymetrie is offline   Reply With Quote
Old 05-03-2009, 16:17   #7
Dymetrie
A large glass of Merlot
 
Dymetrie's Avatar
 
Join Date: Jun 2006
Location: Letchworth with a Lightsaber
Posts: 5,819
Default

AHA!

Finally found something which actually works

Have changed the code to:

Code:
Private Sub Visit_Logging_Click()
On Error GoTo Err_Visit_Logging_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Visits"
    DoCmd.OpenForm "Visits", , , , acFormAdd

Exit_Visit_Logging_Click:
    Exit Sub

Err_Visit_Logging_Click:
    MsgBox Err.Description
    Resume Exit_Visit_Logging_Click
Will find out if that borks everything when I need to use the DB tomorrow morning
__________________

Khef, Ka and Ka-Tet....
Dymetrie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 15:27.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.