05-03-2009, 11:53 | #1 |
A large glass of Merlot
Join Date: Jun 2006
Location: Letchworth with a Lightsaber
Posts: 5,819
|
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.... |
05-03-2009, 14:14 | #2 |
ex SAS
Join Date: Jun 2006
Location: JO01ou
Posts: 10,062
|
My DBA said "Open it as an insert rather than a query"
Then he said "Tell him GIYF, that's a stupid question"
__________________
|
05-03-2009, 14:36 | #3 |
A large glass of Merlot
Join Date: Jun 2006
Location: Letchworth with a Lightsaber
Posts: 5,819
|
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.... |
05-03-2009, 14:42 | #4 |
A large glass of Merlot
Join Date: Jun 2006
Location: Letchworth with a Lightsaber
Posts: 5,819
|
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.... |
05-03-2009, 14:43 | #5 |
Rocket Fuel
Join Date: Jul 2006
Posts: 7,826
|
|
05-03-2009, 15:58 | #6 |
A large glass of Merlot
Join Date: Jun 2006
Location: Letchworth with a Lightsaber
Posts: 5,819
|
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.... |
05-03-2009, 16:17 | #7 |
A large glass of Merlot
Join Date: Jun 2006
Location: Letchworth with a Lightsaber
Posts: 5,819
|
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
__________________
Khef, Ka and Ka-Tet.... |