اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

الردود الموصى بها

قام بنشر

الكود

   Dim mytable As ADODB.Recordset

    Set mytable = New ADODB.Recordset

    mytable.Open "TABLE1", ActiveConnection, adOpenDynamic


mytable.AddNew

      mytable!Name = [Forms]![UnboundForm]![Name]

      mytable!Salary = [Forms]![UnboundForm]![Salary]

      mytable!Birthday = [Forms]![UnboundForm]![Birthday]

mytable.Update


mytable.Close

مرفق المثال

UnboundADO.zip

  • Thanks 1
  • 5 months later...
  • 2 weeks later...
  • 5 months later...
  • 1 month later...
قام بنشر

تعديل للكود ليعمل علي أوفيس 2003

Dim cn As ADODB.Connection
   Dim rs As ADODB.Recordset
         
   Set cn = CurrentProject.AccessConnection

    Set rs = New ADODB.Recordset
   With rs
      Set .ActiveConnection = cn
      .Source = "SELECT * FROM Table1"
      .LockType = adLockOptimistic
      .CursorType = adOpenKeyset
      .Open
   End With


    rs.AddNew
      rs!Name = [Forms]![UnboundForm]![Name]
      rs!Salary = [Forms]![UnboundForm]![Salary]
      rs!Birthday = [Forms]![UnboundForm]![Birthday]
   rs.Update

rs.Close


   Set rs = Nothing
   Set cn = Nothing

مرجع فى الموضوع

http://support.microsoft.com/default.aspx?...product=acc2002

مع تحياتي

  • 16 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information