Can somebody help me formulate a VB program the would Record TIN numbers of a tax payer?
With a sorting function and search function. The most basic of VB that could be formed.
Any replies would be a great help! :D Thank you.

Dani AI

Generated

A minimal, practical plan clarifies the task asked by : treat each TIN as text (preserve leading zeros), validate format before accepting it, show records in a grid, and persist them to a simple store. For a modern, small desktop tool use VB.NET WinForms with a DataTable + DataGridView + BindingSource; for legacy VB6 use ADO/MSFlexGrid or an Access file. Remember TINs are sensitive personal identifiers — apply access control and avoid leaving plain files accessible.

Implementation sketch (keeps scope small and testable):

  • UI: TextBoxes for TIN and Name, Buttons for Add/Edit/Delete, DataGridView/ListView to display results.
  • Storage: CSV for tiny projects; Access/SQLite for reliability or concurrent access.
  • Validation: use a regex that matches your country format (example: nine digits -> ^\d{9}$). Keep TINs as strings.
  • Search: in-memory filter (DataView.RowFilter or LINQ) for instant results on small datasets.
  • Sort: let DataGridView do column-header sorting or call DataGridView.Sort programmatically; if numeric ordering is required, store/compute a numeric key to sort on.

Minimal VB.NET examples (assume DataTable tbl exists):

' add a record
Dim r As DataRow = tbl.NewRow()
r("TIN") = tinTextBox.Text.Trim()
r("Name") = nameTextBox.Text.Trim()
tbl.Rows.Add(r)
' simple search (DataView filter)
Dim dv As DataView = New DataView(tbl)
dv.RowFilter = String.Format("TIN LIKE '%{0}%'", searchText.Replace("'", "''"))
dataGridView.DataSource = dv

Practical tips: add a Unique constraint on the TIN column or check for duplicates before adding; pad or normalize TINs if you need numeric ordering; sanitize inputs to avoid injection in filters. As noted, showing any starter code narrows answers; ’s reminder about forum posting etiquette is relevant when asking for finished code.

Recommended Answers

All 2 Replies

How about I code for you with a price? :D

How about showing us what you have done so far for this project?..

Refer my previous post to your question on 'Question Answer Program'

Our Software Development forum category encompasses topics related to application programming and software design. When posting programming code, encase it in (code), (code=syntax), where 'syntax' is any language found within our Code Snippets section, or (icode), for inline code, bbcode tags. Also, to keep DaniWeb a student-friendly place to learn, don't expect quick solutions to your homework. We'll help you get started and exchange algorithm ideas, but only if you show that you're willing to put in effort as well.
Our VB forum is the place for Q&A-style discussions related to legacy versions of VB as well as PowerBuilder. Note that we also have a separate Legacy Languages forum within the Software Development category, a VB.NET forum within the Software Development category, and an ASP.NET forum within the Web Development category.

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.