Is there a way to add new records to an intranet access database from a workstation access database.
I’m able to automatically download data from the intranet db when the workstation db opens using vba & asp examples that I found on the web.
I can’t figure out how to add records. Can someone point me in the right direction.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Add records to a MS Access web database (2K)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Add records to a MS Access web database (2K)
- This topic has 16 replies, 3 voices, and was last updated 21 years, 5 months ago.
AuthorTopicWSready4data
AskWoody LoungerDecember 10, 2003 at 1:23 pm #397743Viewing 1 reply threadAuthorReplies-
WSDrew
AskWoody LoungerDecember 10, 2003 at 8:03 pm #755514I am assuming that you have the ability to create an asp page on the Intranet in question? The next question is are we talking about one record, or are we talking about a bunch of records. I ask, because if you are just pushing one record, and the data isn’t going to exceed a thousand (and change) characters, then you can just ‘open’ a link with the data in a querystring. But if you are pushing lots of records, you’ll need to ‘POST’ the data, through a form.
-
WSready4data
AskWoody LoungerDecember 10, 2003 at 8:25 pm #755532Drew,
I have control of the intranet server. The amount of data will vary depending on the user that connects. A bunch? Shouldn’t be more than 100 records at a time. Unfortunately ther are 86 fields in the table(not my design).You mention POST through a form. Is that in access or a web based form?
With the table info I gave you, let me know the best way.
Thanks -
WSDrew
AskWoody LoungerDecember 10, 2003 at 10:43 pm #755580Make a function that creates an HTML page with a form that posts the data that you want…
Function CreateHTMLForm()
Dim strTemp As String
Dim f As Long
Dim rs As Recordset
Dim strSQL as String
dim i as Long
Dim j as Long
strSQL=”SELECT * FROM MyTable”
set rs=CurrentDB.OpenRecordset(strSQL)
rs.MoveFirst
strTemp=”” & vbcrlf
j=0
Do Until rs.EOF=True
j=j+1
For i=0 to rs.Fields.Count
strTemp=strTemp & “” & vbcrlf
Next i
rs.MoveNext
Loop
rs.close
set rs=nothing
strTemp=strTemp & “” & vbcrlf & _
“” & vbcrlf & “” & vbcrlf & “EntryForm.submit” & vbcrlf & “” & vbcrlf & “”
f=FreeFile
Open “C:TempHTML.htm” for Binary Access Write As f
Put f,,strTemp
Close f
End FunctionNow you have to make an ASP page that will accept this data:
<%
Dim cnn
Dim rs
Dim i
Dim j
set cnn=server.createobject("ADODB.Connection")
set rs=server.createobject("ADODB.Recordset")
cnn.Provider="Microsoft.Jet.OLEDB.4.0"
cnn.Open "D:MyDB.mdb"
rs.Open "tblMyDataTable",cnn,1,3
For i=1 to request.form("RecordCount")
rs.AddNew
For j=0 to rs.Fields.Count
rs.Fields(j).value=request.form(rs.Fields(j).Name & i)
Next
rs.Update
Next
rs.close
set rs=nothing
cnn.close
set cnn=nothing
response.write "” & vbcrlf & “window.close” & vbcrlf & “” & vbcrlf
%>Then all you have to do, is launch the page in a browser, and it’ll do the rest.
-
WSClausParkhoi
AskWoody Lounger -
WSready4data
AskWoody LoungerDecember 11, 2003 at 11:24 am #755793Drew,
Thanks for the code. Claus I caught that mistake after the first run.
Drew I’m getting a page cannot be displaye in the browser(see pix).
The TempHTML.htm seems to be created ok.
I checked the table in the target db and all the fields are the same.
I caught the missing -1
What else can I check. I’m justarting to learn asp so bear with me.
Thanks,
Scott -
WSready4data
AskWoody Lounger -
WSDrew
AskWoody LoungerDecember 11, 2003 at 4:00 pm #755997That’s browser thing. http://forums.devshed.com/archive/1/2003/7/1/65501%5B/url%5D goes into it a bit, with a possible work around.
However, if you are launching the site with a custom browser, something you control as it is, then you can simply watch for the completion of the .asp page, and close the browser from the outside (like if you are using Automation with IE, or if you are using a webbrowser control from VB).
-
WSDrew
AskWoody LoungerDecember 11, 2003 at 4:00 pm #755998That’s browser thing. http://forums.devshed.com/archive/1/2003/7/1/65501%5B/url%5D goes into it a bit, with a possible work around.
However, if you are launching the site with a custom browser, something you control as it is, then you can simply watch for the completion of the .asp page, and close the browser from the outside (like if you are using Automation with IE, or if you are using a webbrowser control from VB).
-
WSready4data
AskWoody Lounger -
WSready4data
AskWoody LoungerDecember 11, 2003 at 11:24 am #755794Drew,
Thanks for the code. Claus I caught that mistake after the first run.
Drew I’m getting a page cannot be displaye in the browser(see pix).
The TempHTML.htm seems to be created ok.
I checked the table in the target db and all the fields are the same.
I caught the missing -1
What else can I check. I’m justarting to learn asp so bear with me.
Thanks,
Scott -
WSDrew
AskWoody Lounger -
WSDrew
AskWoody Lounger
-
-
-
WSClausParkhoi
AskWoody Lounger
-
-
-
WSDrew
AskWoody LoungerDecember 10, 2003 at 10:43 pm #755581Make a function that creates an HTML page with a form that posts the data that you want…
Function CreateHTMLForm()
Dim strTemp As String
Dim f As Long
Dim rs As Recordset
Dim strSQL as String
dim i as Long
Dim j as Long
strSQL=”SELECT * FROM MyTable”
set rs=CurrentDB.OpenRecordset(strSQL)
rs.MoveFirst
strTemp=”” & vbcrlf
j=0
Do Until rs.EOF=True
j=j+1
For i=0 to rs.Fields.Count
strTemp=strTemp & “” & vbcrlf
Next i
rs.MoveNext
Loop
rs.close
set rs=nothing
strTemp=strTemp & “” & vbcrlf & _
“” & vbcrlf & “” & vbcrlf & “EntryForm.submit” & vbcrlf & “” & vbcrlf & “”
f=FreeFile
Open “C:TempHTML.htm” for Binary Access Write As f
Put f,,strTemp
Close f
End FunctionNow you have to make an ASP page that will accept this data:
<%
Dim cnn
Dim rs
Dim i
Dim j
set cnn=server.createobject("ADODB.Connection")
set rs=server.createobject("ADODB.Recordset")
cnn.Provider="Microsoft.Jet.OLEDB.4.0"
cnn.Open "D:MyDB.mdb"
rs.Open "tblMyDataTable",cnn,1,3
For i=1 to request.form("RecordCount")
rs.AddNew
For j=0 to rs.Fields.Count
rs.Fields(j).value=request.form(rs.Fields(j).Name & i)
Next
rs.Update
Next
rs.close
set rs=nothing
cnn.close
set cnn=nothing
response.write "” & vbcrlf & “window.close” & vbcrlf & “” & vbcrlf
%>Then all you have to do, is launch the page in a browser, and it’ll do the rest.
WSready4data
AskWoody LoungerDecember 10, 2003 at 8:25 pm #755533Drew,
I have control of the intranet server. The amount of data will vary depending on the user that connects. A bunch? Shouldn’t be more than 100 records at a time. Unfortunately ther are 86 fields in the table(not my design).You mention POST through a form. Is that in access or a web based form?
With the table info I gave you, let me know the best way.
ThanksWSDrew
AskWoody LoungerDecember 10, 2003 at 8:03 pm #755515I am assuming that you have the ability to create an asp page on the Intranet in question? The next question is are we talking about one record, or are we talking about a bunch of records. I ask, because if you are just pushing one record, and the data isn’t going to exceed a thousand (and change) characters, then you can just ‘open’ a link with the data in a querystring. But if you are pushing lots of records, you’ll need to ‘POST’ the data, through a form.
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
To download Win 11 Pro 23H2 ISO. (Awaiting moderation)
by
Eddieloh
47 minutes ago -
Manage your browsing experience with Edge
by
Mary Branscombe
1 hour, 25 minutes ago -
Fewer vulnerabilities, larger updates
by
Susan Bradley
3 minutes ago -
Hobbies — There’s free software for that!
by
Deanna McElveen
1 hour, 27 minutes ago -
Apps included with macOS
by
Will Fastie
1 hour, 28 minutes ago -
Xfinity home internet
by
MrJimPhelps
6 hours, 17 minutes ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
8 hours, 16 minutes ago -
Debian 12.11 released
by
Alex5723
16 hours, 43 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
20 hours, 24 minutes ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
2 hours, 10 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
16 hours, 52 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
1 day, 13 hours ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
1 day, 3 hours ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
1 day, 15 hours ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
1 day, 8 hours ago -
Some advice for managing my wireless internet gateway
by
LHiggins
15 hours, 48 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
8 hours, 40 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
2 days, 1 hour ago -
Sometimes I wonder about these bots
by
Susan Bradley
1 day, 21 hours ago -
Does windows update component store “self heal”?
by
Mike Cross
1 day, 11 hours ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
2 days, 15 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
23 hours, 23 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
12 hours, 1 minute ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
2 days, 18 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
2 days, 18 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
2 days, 6 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
3 days, 2 hours ago -
0Patch, where to begin
by
cassel23
2 days, 20 hours ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
3 days, 15 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
3 days, 3 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.