Results 1 to 6 of 6
  1. #1
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581

    Default value

    I made a continuous form. I have a combo box for names. The names are populated through a query so I can use a full name. I found out that filling out this form meant putting in the same name over and over. I put a default combo box using the same query so I can use it as a default value. However when I fill out the form now, the first name combo box is blank. The subsequent ones are populated just fine. I'm not sure why it does this.

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Have you looked at the column widths in the properties window. I'm unclear about the problem. Could you post a picture?

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Also it would probably help us help you if you would post the SQL statement used for the Query.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581
    The form is based on a table. The only query I that comes close to this is this one:
    SELECT tblBollardsXEmployees.BollardsXEmployees, tblBollardsXEmployees.DateChecked, tblBollardsXEmployees.BollardID, tblBollards.Location, tblBollardsXEmployees.EmployeesID, tblBollardsXEmployees.Note, [LastName] & ", " & [FirstName] & " #" & [UnitNumber] AS FullName, tblAreaList.Area, tblShiftList.Shift
    FROM (((tblBollardsXEmployees INNER JOIN tblBollards ON tblBollardsXEmployees.BollardID = tblBollards.BollardID) INNER JOIN tblEmployees ON tblBollardsXEmployees.EmployeesID = tblEmployees.EmployeesID) INNER JOIN tblAreaList ON tblBollardsXEmployees.AreaListID = tblAreaList.AreaListID) INNER JOIN tblShiftList ON tblBollardsXEmployees.ShiftListID = tblShiftList.ShiftListID;

  5. #5
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581
    The query for the name field is this:
    SELECT tblEmployees.EmployeesID, tblEmployees.LastName, tblEmployees.FirstName, tblEmployees.UnitNumber, tblEmployees.Employed, tblRankList.Rank, [LastName] & ", " & [FirstName] & " #" & [UnitNumber] AS FullName
    FROM tblEmployees INNER JOIN tblRankList ON tblEmployees.RankID = tblRankList.RankID
    WHERE (((tblEmployees.Employed)=True) AND ((tblRankList.Rank)="Officer")) OR (((tblEmployees.Employed)=True) AND ((tblRankList.Rank)="Corporal")) OR (((tblEmployees.Employed)=True) AND ((tblRankList.Rank)="Sergeant")) OR (((tblEmployees.Employed)=True) AND ((tblRankList.Rank)="Lieutenant")) OR (((tblEmployees.Employed)=True) AND ((tblRankList.Rank)="Captain")) OR (((tblEmployees.Employed)=True) AND ((tblRankList.Rank)="PSO"));

  6. #6
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581
    Here's a picture of the form. The "Checked by" field is the name field. I put the "Default" in the form header. It uses the same query as the "Checked by" field. I unbound the field so that it would be used as reference. Also attaching a picture of the properties of that "Checked by" field. Click image for larger version. 

Name:	bollard.jpg 
Views:	9 
Size:	40.1 KB 
ID:	29240Click image for larger version. 

Name:	bollardProperties.jpg 
Views:	9 
Size:	61.4 KB 
ID:	29241

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

Similar Threads

  1. Default value
    By Wabos42 in forum Access
    Replies: 4
    Last Post: 09-12-2016, 11:02 AM
  2. Set a default on the fly
    By Thompyt in forum Programming
    Replies: 5
    Last Post: 03-25-2016, 11:41 AM
  3. Default Value
    By Njliven in forum Access
    Replies: 1
    Last Post: 10-10-2012, 12:48 PM
  4. Set default value
    By accessnewb in forum Programming
    Replies: 3
    Last Post: 08-17-2011, 06:24 PM
  5. Default value
    By Hatye in forum Access
    Replies: 1
    Last Post: 06-19-2011, 05:16 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