Results 1 to 2 of 2

Access code pull data in forms.fields from sql request troubleshot

Threaded View

  1. #1
    Registered User
    Join Date
    12-05-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    1

    Access code pull data in forms.fields from sql request troubleshot

    Hello , could anybody tell me how pull data from simple request SQL in the field of forms , thanks
    here some code

    Private Sub Form_Open(Cancel As Integer) ' 
    dim strSQL as string 
    dim orderID as varint 
    orderId= 20 
    
        strSQL = "SELECT table.[ID_Excel] FROM table wHERE ID=" & OrderID 
     Debug.Print strSQL  ' correct
    
    Me.RecordSource = strSQL ' nothing happening actually here is issue
    Me.поле0.value = strSQL  ' 
    ' here wrote in field "select table.[ID_Excel] FROM table " instead of true value = 5000 
    
    end sub
    Moderator Note:

    Pls use code tags around your code next time as per forum rules.
    Last edited by alansidman; 12-05-2013 at 11:24 AM. Reason: inappropriate language replaced

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. access SQL to pull all fields in a table and group them based on their ID
    By ewong in forum Access Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2012, 05:18 PM
  2. Choose between request forms
    By WChristi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2011, 04:19 PM
  3. Pull 5 values into fields based on code name
    By sabes35 in forum Excel General
    Replies: 7
    Last Post: 07-26-2010, 07:50 PM
  4. How to pull values from the pivot table fields, through the code/.
    By seven_snow in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-11-2006, 07:50 AM
  5. Converting Forms to Data Access Pages
    By Jason in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 01-24-2005, 12:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1