Make Table Query- Pulling Date Field

andmunn

Registered User.
Local time
Yesterday, 16:07
Joined
Mar 31, 2009
Messages
195
Hi All,

I have a make-table query that pulls all the fields from 1 table (MainTable), and creates a new table with a date stamp based apon a form value entered (New Table = MainTableWithDate).

Currently, I setup the query to pull info from the form field like this:

DateField: [Forms]![frmmain]![DateField]

However, when the make-table query is done - all date fields are blank (all other fields are correctly created), and when I look at the new created table (mainTableWIthDate), the typeassigned to the date field is "Binary" (in the form, I've specified LongDate).

Any advice? I'm sure i'm missing something simple :)

Thanks!
Andrew.
 
It might help to see this one. It sounds a bit confusing.
 
Thanks for the reply - please see the attached image of the make-table query. The first field (DateImportFile) i'm trying to pull the date from a form which would have been manually entered by the user.

Does that help?

FYI - the field DateImportFile reads:

DateImportFile: [Forms]![frmMain]![DateField]

Thanks!
Andrew.
 

Attachments

  • Database.png
    Database.png
    19.6 KB · Views: 170
Hi CsH,

No - the form is not bound to the table.

Andrew.
 
There might be a few ways to do this. Without seeing the database itself, I'm going to give two options:

#1 - If the table that is bound to the form has an ID field that corresponds to the ID field in the MasterWireDataImport table, the you can link those two tables together by ID in this query and pull the date that way.

#2 - Else, you can use a Dlookup function in that query field.

Primarily what you would run into here is that, Access cannot call a field value unless it knows how to relate it to the record you're working with. Meaning, you could have 100 dates listed on your form - how does access know which one to apply to that record in your table/query MasterWireDataImport?
 
Hi Csh,

I used what you recommend in Point 1 and it seems to work - by linking the tables. I appreciate your help - i think i was just missing one simple step :)

Thanks!
Andrew.
 

Users who are viewing this thread

Back
Top Bottom