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.
Thanks
-
-
WSDrew
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
-
Lumma malware takedown
by
EyesOnWindows
46 minutes ago -
“kill switches” found in Chinese made power inverters
by
Alex5723
2 hours, 20 minutes ago -
Windows 11 – InControl vs pausing Windows updates
by
Kathy Stevens
2 hours, 14 minutes ago -
Meet Gemini in Chrome
by
Alex5723
6 hours, 20 minutes ago -
DuckDuckGo’s Duck.ai added GPT-4o mini
by
Alex5723
6 hours, 28 minutes ago -
Trump signs Take It Down Act
by
Alex5723
14 hours, 27 minutes ago -
Do you have a maintenance window?
by
Susan Bradley
1 hour, 36 minutes ago -
Freshly discovered bug in OpenPGP.js undermines whole point of encrypted comms
by
Nibbled To Death By Ducks
2 hours, 8 minutes ago -
Cox Communications and Charter Communications to merge
by
not so anon
17 hours, 47 minutes ago -
Help with WD usb driver on Windows 11
by
Tex265
22 hours, 56 minutes ago -
hibernate activation
by
e_belmont
1 day, 2 hours ago -
Red Hat Enterprise Linux 10 with AI assistant
by
Alex5723
1 day, 6 hours ago -
Windows 11 Insider Preview build 26200.5603 released to DEV
by
joep517
1 day, 9 hours ago -
Windows 11 Insider Preview build 26120.4151 (24H2) released to BETA
by
joep517
1 day, 9 hours ago -
Fixing Windows 24H2 failed KB5058411 install
by
Alex5723
5 hours, 40 minutes ago -
Out of band for Windows 10
by
Susan Bradley
1 day, 14 hours ago -
Giving UniGetUi a test run.
by
RetiredGeek
1 day, 21 hours ago -
Windows 11 Insider Preview Build 26100.4188 (24H2) released to Release Preview
by
joep517
2 days, 4 hours ago -
Microsoft is now putting quantum encryption in Windows builds
by
Alex5723
40 minutes ago -
Auto Time Zone Adjustment
by
wadeer
2 days, 9 hours ago -
To download Win 11 Pro 23H2 ISO.
by
Eddieloh
2 days, 7 hours ago -
Manage your browsing experience with Edge
by
Mary Branscombe
6 hours, 31 minutes ago -
Fewer vulnerabilities, larger updates
by
Susan Bradley
1 day ago -
Hobbies — There’s free software for that!
by
Deanna McElveen
9 minutes ago -
Apps included with macOS
by
Will Fastie
1 day, 4 hours ago -
Xfinity home internet
by
MrJimPhelps
1 day, 1 hour ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
2 days, 2 hours ago -
Debian 12.11 released
by
Alex5723
3 days, 6 hours ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
3 days, 10 hours ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
2 days, 13 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.