Results 1 to 3 of 3
  1. #1
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    Where does this Variable get its value

    In the attached file which is an example database where does the variable

    Me.txtTicketID g



    et its value?

    I have looked at the code several times and I am not sure. The only place that I can
    guess is the tblHelpDeskTickets. The table that is there at the start of the db use.

    I could be wrong, but I am just curious as to where this variable gets its value.

    Respectfully,

    Lou Reed
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    "me" is the form that's currently in focus and the "txtTicketID" I'm guessing is a textbox on that form that contains the ID. (you may need to find it in design view if the visibility of it is turned off.)

  3. #3
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    With frmHelpDeskTickets open in Design Mode, open the Property Sheet for Control txtTicketID. On the Data Tab, you will see that the Control Source is set to lngTicketID, which is one of the fields available to the form by the Record Source for the form being set to table tblHelpDeskTickets. lngTicketID is a Primary Key field in the table, and wrongly so it is displayed on the form. The PK is a record reference only and should NOT be seen by the user at all.

    Edit: Now I see this is a demo from a website. Demos are demos - not a complete working example, and thus will have issues that need to be resolved before it can be used in a productive environment. For instance, there should be logic built in to generate ticket numbers to reference each ticket. This was short-cutted by the person making the sample and, thus, is a poor example to go by.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 05-28-2013, 12:53 PM
  2. Replies: 2
    Last Post: 03-15-2013, 12:49 PM
  3. Object variable or With block variable not defined
    By PorscheMan in forum Programming
    Replies: 3
    Last Post: 01-16-2013, 01:53 PM
  4. Replies: 0
    Last Post: 08-10-2011, 11:59 AM
  5. Refering to variable form names inside a variable
    By redpetfran in forum Programming
    Replies: 2
    Last Post: 05-21-2010, 01:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums