hello..im trying to do a student registration system

i used access as a database

the system must have a search button to search student name

then whenever i click the student name it will automatically fill the name in a ready made .doc form

any one can help me??

im newbie here..:$

Dani AI

Generated

Brief summary and direction for (and following up on ): the workflow you described (search students from an Access DB, click a name, and have a Word form populated) can be done two main ways. Which to use depends on whether this is a desktop VB.NET (WinForms) app or an ASP.NET web app, and whether your template is .doc or .docx and your Access file is .mdb or .accdb. Those choices change the connection string, the library you should use, and whether Word automation is safe.

For a desktop app (VB 2008 WinForms): use OleDb to query Access, show results in a DataGrid/ListBox, and on row click open a Word template and replace a bookmark or placeholder token. A simple pattern (requires Microsoft Word installed) is:

' desktop approach - requires Word on the machine
Dim app As New Microsoft.Office.Interop.Word.Application()
Dim doc As Microsoft.Office.Interop.Word.Document = app.Documents.Open(templatePath)
doc.Content.Find.Execute(FindText:="@@STUDENTNAME@@", ReplaceWith:=studentName)
doc.SaveAs(outputPath)
doc.Close()
app.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(doc)
System.Runtime.InteropServices.Marshal.ReleaseComObject(app)

Use bookmarks or unique tokens like @@NAME@@ for reliable replacements, and always release COM objects to avoid orphaned Word processes.

For an ASP.NET/web scenario: do NOT use Office Interop on the server (unsupported and unstable). Use Open XML (works with .docx), a library such as DocX/Aspose/GroupDocs, or generate HTML and stream it with Content-Type set to application/msword for simple templates. Connection strings:

  • .mdb: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\path\students.mdb;
  • .accdb: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\path\students.accdb;
    Also watch 32-bit vs 64-bit drivers, use parameterized queries, and ensure the web app has file-system permissions for any generated files.

Recommended Answers

All 2 Replies

Welcome bilaman,

>then whenever i click the student name it will automatically fill the name in a ready made .doc form

Can you be more specific please?

We only give help to those who show effort. You might want to read the homework policy if you run into problems and want to ask for help here.

yup its like when i click example nick john name, it will automatically copy the name in a blank column in a .doc form...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.