Home Database Mysql Tutorial 实例编程:Access新手来看

实例编程:Access新手来看

Jun 07, 2016 pm 03:02 PM
access Example newbie programming chat record explain

述:以一段聊天记录来解释实际生活中编号的定义方法以及误区 问题: 我跟你说说我这边的情况吧。好像工号03-0756-004-1JF,表示:03表示03年生产,0756是合同号,004表示对方单位的编号,1表示合同的第几项,JF是表示车间。你说这样的工号会不会很烦? 回

述:以一段聊天记录来解释实际生活中编号的定义方法以及误区
  问题:
  我跟你说说我这边的情况吧。好像工号03-0756-004-1JF,表示:03表示03年生产,0756是合同号,004表示对方单位的编号,1表示合同的第几项,JF是表示车间。你说这样的工号会不会很烦?
  回答:
  我只能说,你在设计数据结构的时候就已经错误了。
  很多程序员认为 “编号”是一个字段,在计算机中这的确是正确的,但是,在计算机中,编号是没有含义的,没有语法、没有组合、没有任何意义,仅表示记录的唯一标识。而实际生产中,编号往往包含很多意义(除非你使用数据库查询系统来管理随机编号)。因此就像你说的,编号的每个部分都有含义。所以,应该以每个部分为最小单位来建立数据库结构。简单的说,就是 生产日期、合同号、对方单位编号、车间分几个字段存储,这也可以说是“原子性”扩展。其实 SQL 不仅仅可以查询数据,还可以组织数据,比如
  select 日期 & 合同号 & 单位号 & 车间 as 编号,全名 from 产品表
  问题:
  但很惨的是:录入员已经习惯很连续地录入03-0456-002-4JF这样的工号了,叫他们分开来录入,恐怕很麻烦。
  回答:
  你可以在保存按钮上写点代码切分数据,即使连续窗体也可以在 BEFOREUPDATE事件里面写代码。代码可以类似:
  Sub SplitString()
  Dim strA() As String
  strA() = Split(Me.TextBoxA, "-")
  Dim i As Integer
  For i = 0 To UBound(strA)
  Debug.Print strA(i)
  Me("TextBox" & i).value=strA(i)
  Next
  End Sub
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to disable background applications in Windows 11_Windows 11 tutorial to disable background applications How to disable background applications in Windows 11_Windows 11 tutorial to disable background applications May 07, 2024 pm 04:20 PM

1. Open settings in Windows 11. You can use Win+I shortcut or any other method. 2. Go to the Apps section and click Apps & Features. 3. Find the application you want to prevent from running in the background. Click the three-dot button and select Advanced Options. 4. Find the [Background Application Permissions] section and select the desired value. By default, Windows 11 sets power optimization mode. It allows Windows to manage how applications work in the background. For example, once you enable battery saver mode to preserve battery, the system will automatically close all apps. 5. Select [Never] to prevent the application from running in the background. Please note that if you notice that the program is not sending you notifications, failing to update data, etc., you can

How to completely delete TikTok chat history How to completely delete TikTok chat history May 07, 2024 am 11:14 AM

1. Open the Douyin app, click [Message] at the bottom of the interface, and click the chat conversation entry that needs to be deleted. 2. Long press any chat record, click [Multiple Select], and check the chat records you want to delete. 3. Click the [Delete] button in the lower right corner and select [Confirm deletion] in the pop-up window to permanently delete these records.

How to convert deepseek pdf How to convert deepseek pdf Feb 19, 2025 pm 05:24 PM

DeepSeek cannot convert files directly to PDF. Depending on the file type, you can use different methods: Common documents (Word, Excel, PowerPoint): Use Microsoft Office, LibreOffice and other software to export as PDF. Image: Save as PDF using image viewer or image processing software. Web pages: Use the browser's "Print into PDF" function or the dedicated web page to PDF tool. Uncommon formats: Find the right converter and convert it to PDF. It is crucial to choose the right tools and develop a plan based on the actual situation.

How to transfer WeChat chat history to another mobile phone How to transfer WeChat chat history to another mobile phone May 08, 2024 am 11:20 AM

1. On the old device, click "Me" → "Settings" → "Chat" → "Chat History Migration and Backup" → "Migrate". 2. Select the target platform device to be migrated, select the chat records to be migrated, and click "Start". 3. Log in with the same WeChat account on the new device and scan the QR code to start chat record migration.

How to read dbf file in oracle How to read dbf file in oracle May 10, 2024 am 01:27 AM

Oracle can read dbf files through the following steps: create an external table and reference the dbf file; query the external table to retrieve data; import the data into the Oracle table.

How to recover deleted records from TikTok private chats How to recover deleted records from TikTok private chats May 07, 2024 am 11:00 AM

1. After deleting Douyin private message chat history, it is usually impossible to directly restore it. 2. However, you can contact Douyin official to try to communicate the possibility of recovery. 3. Open the Douyin app, enter the "Me" page, click on the three horizontal bars in the upper right corner, and select "Settings" > "About Douyin". 4. Find and call the "Customer Service Hotline" or contact Douyin official via official email to inquire about the possibility of restoring chat records.

The Key to Coding: Unlocking the Power of Python for Beginners The Key to Coding: Unlocking the Power of Python for Beginners Oct 11, 2024 pm 12:17 PM

Python is an ideal programming introduction language for beginners through its ease of learning and powerful features. Its basics include: Variables: used to store data (numbers, strings, lists, etc.). Data type: Defines the type of data in the variable (integer, floating point, etc.). Operators: used for mathematical operations and comparisons. Control flow: Control the flow of code execution (conditional statements, loops).

How to solve access violation error How to solve access violation error May 07, 2024 pm 05:18 PM

Access Violation error is a run-time error that occurs when a program accesses a memory location beyond its memory allocation, causing the program to crash or terminate abnormally. Solutions include: checking array boundaries; using pointers correctly; using appropriate memory allocation functions; freeing freed memory; checking for memory overflows; updating drivers and systems; checking third-party libraries; using a debugger to trace execution; contacting the software vendor for support.

See all articles